My web host directs traffic to the main public_html folder on the site for my main site. However, I want my main site to redirect to a subfolder for organizational reasons, so I can easily manage just the main site files within that folder. Therefore I want to redirect to public_html\mysite.com.
I created a .htaccess file in the public_html folder that does redirect properly when I just point it to a test index.html file. However, when I try to point to index.php file used from Drupal, I get the following error.
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the 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.
This is the content of the .htaccess file which lives in the public_html directory.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?<mysite>.com$
RewriteCond %{REQUEST_URI} !^/<mysite>.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /<mysite>.com/$1
RewriteCond %{HTTP_HOST} ^(www.)?<mysite>.com$
RewriteRule ^(/)?$ <mysite>.com/production/dev-code/index.php [L]
Do I need to modify the .htaccess in public_html\mysite.com? I don't have access to the server error log.