[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apache2, mod_rewrite and RedirectMatch

I have an apache2.15 with a lot of redirections using redirect and redirectmatch directives. Today I write some mod_rewrite rules (because I need some conditional redirections). I put this new rewrite directives after my old redirect and redirectmatch rules, just at the end of the virtualhost definition, because I expect that apache execute first my old definitions, and then my new rewrite rules. But apache execute the mod_rewrite rules in the first place! 

An example:

<VirtualHost *:80>
ServerName myvirtualhost.com
Redirect /lollipop http://lollipop.com
RewriteEngine on
RewriteRule /lollipop http://example.org

myvirtualhost.com/lollipop is redirected to http://example.org !! 

There are any way to change this behavior?

Thanks a lot!

Reply to: