Forum Moderators: phranque
so the structure is thus:
/htdocs/parentdomain - parentdomain.com
/htdocs/parentdomain/anotherdomain - anotherdomain.com
I have some traffic coming in to files that used to be on parentdomain.com in the root, and have moved them to the anotherdomain folder.
When I try to redirect the traffic in .htaccess, it gets caught in a redirect loop. However, redirecting the old pages to a new domain on another server works fine.
Here's the relevant code:
RewriteEngine on
Redirect 301 /widget-feature.html [anotherdomain.com...]
Any help would be appreciated.
Thanks
Ben Davis
Yes, you'll need to use mod_rewrite to do this in order to prevent the loop. Simply add a RewriteCond to your RewriteRule that blocks the redirect if the subfolder path is requested. You can do a site search of WebmasterWorld with the words "subdomain subfolder rewriterule [google.com]" to turn up examples.
Jim