xxx.yyy.com/index.php?a=b&etc -> www.zzz.com/index.ph

Using a single web hosting account to host multiple sites

xxx.yyy.com/index.php?a=b&etc -> www.zzz.com/index.ph

Postby feynman » Mon Feb 12, 2007 5:22 am

Hey Richard,

First off, I want to thank you for all your wonderful posts and for your time that you have spent answering our questions.

The name of our mirror site is: http://something.hostname.com/index.php?a=b&c=d&e=f
and it points to http://www.nameofoursite.com

We changed our host to a different company. The links work fine, but it still points to http://something.hostname.com/index.php?a=b&c=d&e=f instead of saying http://www.nameofoursite.com/index.php?a=b&c=d&e=f

Can you please help me with this? I would greatly appreciate it.
feynman
 
Posts: 2
Joined: Mon Feb 12, 2007 5:02 am

Postby richardk » Tue Feb 13, 2007 11:28 am

Mod_rewrite can't (doesn't) change the links in your pages. You could put a .htaccess file in the something.hostname.com document root and redirect to nameofoursite.com:
Code: Select all
Redirect 301 / http://www.nameofoursite.com/


Or are you trying to do something else?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

I tried this: it worked

Postby feynman » Tue Feb 13, 2007 11:33 am

Thanks Richard,

I tried this approach. It worked. What do you think??

Code: Select all
Options +FollowSymlinks
RewriteEngine on

RewriteCond %{HTTP_HOST} ^something.hostname.com$
RewriteRule ^(.*)$ http://nameofoursite.com/$1 [R=301,QSA,L]


Once again,

Thank you very much for your kind efforts in this forum. I was greatly enlightened.
feynman
 
Posts: 2
Joined: Mon Feb 12, 2007 5:02 am

Postby richardk » Tue Feb 13, 2007 11:55 am

It should work fine.

Code: Select all
RewriteCond %{HTTP_HOST} ^something\.hostname\.com$ [NC]
RewriteRule ^(.*)$ http://www.nameofoursite.com/$1 [R=301,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 19 guests

cron