-1

My folder structure is booking inside a cpanel then getting the http://booking.bdtask.co.za/ and i used the code

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /public_html/index.php/$1 [L,QSA]

But its showing me this message :

booking.bdtask.co.za is currently unable to handle this request. HTTP ERROR 500

Please give me a solution if anybody knows it.

M. Eriksson
  • 13,450
  • 4
  • 29
  • 40
BDTASK
  • 1
  • 2
  • 1
    A 500 error means that a server error occurred. This is most likely an error in your PHP-code. To see the _actual_ error message, check your servers error log. You can also change how PHP displays errors and tell it to show all errors directly on the screen (this is not something you want in production though, since it can show sensitive data, but during development, you should). Here's how to show all errors and warnings: https://stackoverflow.com/questions/5438060/showing-all-errors-and-warnings – M. Eriksson Feb 28 '18 at 06:25
  • Without knowing your _actual_ folder structure + where your document root is, we won't know if that htaccess will work or not. – M. Eriksson Feb 28 '18 at 06:27
  • check your php code with error reporting on first. – Anand Pandey Feb 28 '18 at 06:27
  • Possible duplicate of [Codeigniter subdomain routing](https://stackoverflow.com/questions/21511930/codeigniter-subdomain-routing) – Vishnu Bhadoriya Feb 28 '18 at 07:19
  • If you getting Error 500 doesn't mean its HTACCESS problem try to turned on debug mode and check which error. – Carlvic Lim Mar 01 '18 at 13:49

1 Answers1

0

you can try this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

<Files "index.php">
    AcceptPathInfo On
</Files> 
Caconde
  • 4,177
  • 7
  • 35
  • 32
  • While this code may answer the question, providing additional context regarding why and/or how this code answers the question improves its long-term value. – rollstuhlfahrer Mar 03 '18 at 14:17