February 9th, 2012, 08:26 AM
How to mod_rewrite mirror subfolder to subfolder
I searched the forum and couldn't find what I was looking for, but I am trying to find a mod_rewrite rule so that if i have a site on:
I want to mirror this site on:
I apologize if this is basic, but I have very limited (301 redirect) knowledge of all things htaccess/vhost. Thanks very much for any help!
p.s. i checked the sticky'd thread and didn't see anything like this.
March 11th, 2012, 12:16 PM
Assuming newsite is a non-existent folder in /var/www/vhosts/example.com/httpdocs:[code=example.com/.htaccess]RewriteRule ^newsite(/.*)?$ /originalsite/subfolder$1 [L][/code]You may need to also have the following:[code=example.com/originalsite/subfolder/.htaccess]RewriteEngine Off[/code]
Explain your problem instead of asking how to do what you decided was the solution.