[TriLUG] apache redirect
William Sutton
william at trilug.org
Thu Jan 19 19:02:27 EST 2006
What happens if you try
<VirtualHost *:80>
RewriteCond %{REQUEST_URI} ^/somedir* [C]
ServerName foo.com [L]
Redirect 301 / http://bar.com/
ServerName foo.com
</VirtualHost>
basically....no matter what the host is, if the REQUEST_URI begins
/somedir*, chain to the next rule, which sets ServerName and leaves the
rewrite block...
fwiw...
William
On Thu, 19 Jan 2006, Jason Tower wrote:
> i have a very simple rule in place that redirects all requests for
> foo.com to bar.com:
>
> <VirtualHost *:80>
> Redirect 301 / http://bar.com/
> ServerName foo.com
> </VirtualHost>
>
> i'd like to modify this so that requests for foo.com/somedir* are not
> redirected, but everything else is. i've tried a bunch of things using
> RedirectMatch but haven't quite gotten it to work. i think it's just my
> regexp that is incorrect, can anyone lend a hand?
>
More information about the TriLUG
mailing list