httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
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
mocha'.

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: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message