Hello,
Apologies if this is not the correct area to post my problem.
I have two separate drupal installations on my webhosting ISP. One is used as the production site at the root level (www.mysite.com) and the other is a staging site in a subdirectory (www.mysite.com/testsite). I've adapted the root level .htaccess file of the production site to redirect all users to access the site without the www prefix by uncommenting the ReWrite section:
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$ [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301]
and added the 'ReWriteBase /' line as well since it's running in a VirtualDocumentRoot.
This works fine on the production site and the www. prefix is stripped off accordingly.
When I attempt to do the same with the /testsite/.htaccess file of the staging site located in the subdirectory (i.e. using the same RewriteCond / RewriteRule to remove the www prefix and adding 'ReWriteBase /testsite'), users accessing the staging site with 'http://www.mysite.com/testsite' get redirected to a page not found at the following url:
http://mysite.com//services/webpages/mysite.com/public/testsite
which I assume corresponds to the VirtualDocumentRoot path.
Can someone please help in resolving this issue? Should I be doing something else with either of the .htaccess files to prevent this from happening on the staging site?
Thanks in advance to anyone who can help.
dleong