httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] robots.txt and rewrite rule
Date Sat, 24 Jan 2009 23:31:27 GMT
Norman Khine wrote:
[...]
Hi.
Sorry to butt in, but is it not just the RewriteCond that is badly written ?

 From the Apache documentation :
(http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html)

#  RewriteRule backreferences: These are backreferences of the form $N 
(0 <= N <= 9), which provide access to the grouped parts (in 
parentheses) of the pattern, from the RewriteRule which is subject to 
the current set of RewriteCond conditions..

# RewriteCond backreferences: These are backreferences of the form %N (1 
<= N <= 9), which provide access to the grouped parts (again, in 
parentheses) of the pattern, from the last matched RewriteCond in the 
current set of conditions.

So should
RewriteCond $1 !=robots.txt
not be
RewriteCond %1 !=robots.txt

or, maybe better because independent of the previous RewriteCond directives

RewriteCond %{REQUEST_URI} !"/robots.txt$"

?


---------------------------------------------------------------------
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


Mime
View raw message