Redirect absolutely anything to new domain with .htaccess

Posted by John Hunt on Server Fault See other posts from Server Fault or by John Hunt
Published on 2011-12-01T00:58:27Z Indexed on 2011/12/01 2:00 UTC
Read the original article Hit count: 522

Filed under:
|
|

Ok, so I'm in need a simple redirect:

Redirect 301 / http://www.new.com/

Similar to that, except I want it to catch anything, such as:

www.old.com/blah/blah/?xyz=123&aaaaabbbb=erewr3ttt#ewtjhirhjerh

and send the user to:

www.new.com

Should be easy right? Finding out how to do this is not so easy. Using the above rule we're still getting 404's for things that aren't there rather than the Redirect rule just getting everything.

© Server Fault or respective owner

Related posts about .htaccess

Related posts about redirect