troubleshooting Question

.htaccess -> leading visitors from "old domains" to the desired products on "new domains"

Avatar of Ralf Klatt
Ralf KlattFlag for Germany asked on
Apache Web Server
6 Comments1 Solution292 ViewsLast Modified:
Hi,

I am transferring contents of some domains to some other domains and I'd like (until February 2006) to lead all visitors still comming to the old domains to be directed to the desired products on the new domains ... I'm currently using this script in my .htaccess file:

# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName MyOldDomain.com
AuthUserFile /pages/77/f99999999/htdocs/_vti_pvt/service.pwd
AuthGroupFile /pages/77/f99999999/htdocs/_vti_pvt/service.grp
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^.*\.MyOldDomain.com/.*$ [NC]
ReWriteRule .*\.*$ http://www.MyNewDomain.com/ [R,L]

... but id doesn't do the trick -> what it does is obvious, it only rewrites the referrer in a permanent way to the starting page of the new domain -> my question is thus, is it possible to only rewrite ...

MyOldDomain.com to MyNewDomain.com

... and keep the pages constant?

Like, someone coming in from:

http://www.MyOldDomain.com/MyProducts/product777.html

Would reach at:

http://www.MyNewDomain.com/MyProducts/product777.html


Best regards,
Raisor
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros