I have deployed a website that uses CodeIgniter (http://www.myexample.com/
) in the main public_html
folder. In order to remove index.php
from URL this has the following .htaccess
:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|js|css|app|favicon\.ico|uploads|thumbs|assets|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
Now, I've created a sub-domain where I've deployed the same website in order to have a development environment (http://dev01.myexample.com/
). I’ve copied the whole website in the folder public_html/dev01
. However, when I try to go to the website I'm getting an Internal Server Error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@dev01.myexample.com to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I know this is related to the .htaccess
settings. However I'm not able to determine why this error is happening.
So far I've tried erasing .htaccess
in both folders, or copying the .htaccess
in both website folders. And also tried the following in the subdomain .htaccess
file using relative path:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|js|css|app|favicon\.ico|uploads|thumbs|assets|robots\.txt)***
RewriteRule ^(.*)$ dev01/index.php?/$1 [L]
Does anyone know what could be the issue?