httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <>
Subject Re: [users@httpd] mod_rewrite problem
Date Mon, 16 Apr 2012 01:40:56 GMT
> # RewriteRule ^(.*)$ coffee.cgi?type=$1

> But apache2 erroneously outputs 'You ordered a coffee.cgi', instead of 'You ordered a

When you make a substitution in htaccess with mod_rewrite, the
resulting substitution gets fed back in and rewrites get a chance to
run against the new URL.

So you want to protect this rule so it does not match requests to
coffee.cgi, the simplest way being to prefix with

  RewriteCond %{REQUEST_URI} !=/coffee.cgi

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message