Hi
When I test use an .htaccess file that looked like this:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.sub.domain.com$
RewriteRule ^(.*)$ http://domain.com/folder [R=301,L]
it works fine, permanently redirecting the subdomain and all URLs that starts with it, to thir equivalent URLs in the new folder.
But when I use the otherwise, trying to redirect domain.com/folder to sub.domain.com, it does nothing, as if it's not there!
Here is what I use now:
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com/folder$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com/folder$
RewriteRule ^(.*)$ http://sub.domain.com [R=301,L]
whats wrong here? why its not working the other way round?
I need it to redirect all old URLs to thier new ones.
I appreciate any help. Many thanks 
|