3

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.

Andy Smith
  • 1,868
John Hunt
  • 419

2 Answers2

5

Alternatively, you can use the RedirectMatch directive instead of using mod_rewrite:

RedirectMatch 301 ^ http://www.new.com/

Note the ^ can be interchanged with .*, both regular expressions with match everything.

Jon Lin
  • 1,383
1

This should work:-

RewriteRule (.*) http://www.new.com/ [R=301,L]

The (.*) will match everything, and redirect to just http://www.new.com/.

Edit: This was for Apache, I've retagged the question as being for Zeus.

Andy Smith
  • 1,868