• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 147
  • Last Modified:

Best approach to redirect mulitple domains to a new domain

We are running Apache 2.2 and we need to create some permanent redirects for multiple domain names to a new domain. Some sites will be re-directing to a transition page while the others re-directed transparently.

For example, the new domain is www.new.com

We would like www.test1.com/hi/there/index.html to re-direct to www.new.com/transition.html

We would like www.test2.com/my/goodness/index.html to re-direct to www.new.com

Could someone help with the mod_rewrite code (preferred) or what I should add to a .htaccess file?

Thanks in advance,

A.
0
Angeal
Asked:
Angeal
1 Solution
 
sentnerCommented:
Try:


RewriteRule  ^/hi/there/index.html http://www.new.com/transition.html [R,L]

RewriteRule ^/my/goodness/(.*) http://www.new.com/$1 [R,L]
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now