2
Contributors
7
Replies
9
Views
5 Years
Discussion Span
Last Post by skraps
0
RewriteCond %{HTTP_HOST} ^www\.mysite\.com/home$ [NC]

That line is for the host www.com not the uri ie:page . So if you have multiple domains on that account you might want

RewriteBase /
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^home$ http://www.mynewsite.com/welcome [R=301,L]

or every url that goes to your old site would be

RewriteBase /
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^(.*)$ http://www.mynewsite.com/welcome [R=301,L]

Edited by skraps: n/a

0

I have another question on the redirection, the .htaccess is currently in my /www folder, however, am creating a new subdomain, tv.mysite.com, which must redirect again to my http://www.mynewsite.com/welcome, and the directory "tv" will be at the root of the server, how to go on with this redirection? same as before?

0
RewriteBase /
    RewriteCond %{HTTP_HOST} ^tv.mysite.com$
    RewriteRule ^(.*)$ http://www.mynewsite.com/welcome [R=301,L]

Yep I configured this in my htaccess, however, as I had to create a directory "tv" in my root, it is instead going there from the browser instead of redirecting to the url. Anything wrong I've done? My folder mysite.com is in fact in a hierarchy like this on the server:

root->www->sites->mysite.com, while the tv folder is root->tv

Sorry for the trouble, but its my first attempt at sub-domain creation and redirection

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.