You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matthew Shannon <ma...@paycom.net> on 2004/03/09 20:00:20 UTC
[users@httpd] Redirect Match
Hello All,
I am trying to do a redirect on everything not included in
"somedirectory". Is there a way to do a
RedirectMatch ( not in ) /somedirectory" ???
Thanks,
-m
---------------------------------------------------------------------
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
Re: [users@httpd] Redirect Match
Posted by Joshua Slive <jo...@slive.ca>.
Matthew Shannon wrote:
> Hello All,
> I am trying to do a redirect on everything not included in
> "somedirectory". Is there a way to do a
> RedirectMatch ( not in ) /somedirectory" ???
Depending on the version of apache, you may be able to use a negative
assertion in a regex, but the sure way is to use mod_rewrite:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/somedirectory
RewriteRule .* http://someplace/else/
Joshua.
---------------------------------------------------------------------
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