[...]
> From: Rich Bowen [mailto:[EMAIL PROTECTED] 
[...]
> Michael D. Berger wrote:
> > The following:
> 
> >    RewriteCond %{REQUEST_URI} !^.*/picts/.*$
> >    RewriteRule ^/(.*/)?$ /index.cgi [L]
> > 
> > sends
> >    GET /favicon.ico
> > to index.cgi .  I would not expect this because it
> > does not appear to match any pattern.  Wherein do
> > I err?
> 
> The REQUEST_URI is /favicon.ico, and this matches 
> !^.*/picts/.*$ - that
> is, it's a string that doesn't contain /picts/ anywhere in it.
> It also matches the RewriteRule pattern ^/(.*/)?$ because it 
> starts with
> a slash, and doesn't contain the optional "something followed 
> by a slash".
> So, according to this ruleset, it's supposed to rewrite that 
> to /index.cgi
> 
> So it seems that it's doing exactly what you asked for it to do.
> 
> The real question is what you're trying to do with this 
> rewrite ruleset,
> since that's not really evident.

The picts line is functioning as expected.  Such lines are
handled differently elsewhere. With regard to the RewriteRule
line, this is functioning correctly only of you ignore the
'$' end-of-line anchor.  From a linux box:

   echo // | grep -P "^/(.*/)?$"
   //
   echo / | grep -P "^/(.*/)?$"
   /
   echo /x.y | grep -P "^/(.*/)?$"
   echo /x.y/ | grep -P "^/(.*/)?$"
   /x.y/

Notice the one line that doesn't echo.  BTW, this is exactly
what I am trying to do.  The question is why the difference
between grep -P and RewriteRule?  I have yet to follow the
advice in another response and turn on logging.

Mike.
--
Michael D. Berger
[EMAIL PROTECTED] 

[...]



---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to