htaccess code for forwarding a domain
admin | Aug 26, 2009 | Comments 0
Issue :
The old domain ( with and without ‘www’ ) needs to be forwarded to a sub-folder of the new domain.
Solution :
Use the following htaccess code :
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
RewriteRule ^(.*)$ http://newdomain.com/folder/$1 [R=permanent,R]
Filed Under: Quick fixes • Technical
About the Author: InstaCarma is a provider of Enterprise Class Solutions for the Hosting Industry

1800 810 6547