httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] redirecting to another url
Date Fri, 31 Oct 2003 20:51:24 GMT

On Fri, 31 Oct 2003, John Smith wrote:

> What's the best way to redirect requests for an old
> domain to a new domain?
>
> RedirectMatch permanent * http://newdomain.com
>
> ?

See:
http://httpd.apache.org/docs-2.0/urlmapping.html#redirect

The answer depends on whether you want the user redirected to the same
path at the new domain.  If so:
Redirect permanent / http://newdomain.com/
If not:
RedirectMatch permanent .* http://newdomain.com/

(Redirect implicitly tags the rest of the URL onto the redirect, while
RedirectMatch does not.)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message