-2

Title says it all really, I want to be able to 301 redirect from subdomain.domain1.com to domain2.com.

I have full access to the servers and have tried various things using .htaccess but have had no success.

The reason for this is because I have a site that was hosted on a subdomain but has since moved to its own domain and I want to redirect any requests to the right place. How would one go about achieving this?

0

2 Answers 2

2

It should be just a case of putting something like the following in

redirect 301 /index.htm http://domain2.com/index.htm

Though you can also do stuff with mod rewrite to catch all requests.

0

In your httpd.conf file, inside the vhost that serves subdomain.domain1.com:

Redirect Permanent / http://domain2.com/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .