-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael D. Berger wrote:
> [...]
> 
>>From: Rich Bowen [mailto:[EMAIL PROTECTED] 
> 
> [...]
> 
>>Michael D. Berger wrote:
>>
>>>The following:
>>
>>>   RewriteCond %{REQUEST_URI} !^.*/picts/.*$
>>>   RewriteRule ^/(.*/)?$ /index.cgi [L]

...

> 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 "^/(.*/)?$"

That's correct. It doesn't match, because the (.*/) is optional, and
when it's *not* there, then the regex is equivalent to ^/$ - ie, it
insists that it ends with the slash, which this string does not do.

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

I'm sorry, it's still not clear what you're trying to accomplish with
these rules. Can you state in words what the rules are supposed to solve?

- --
Rich Bowen
[EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDaAc5XP03+sx4yJMRAnElAJ9a6Plipw9mpuVd4XJcxrsJkKIw0gCfWXjG
7NuaPLXEEEybrMnq1GtTUsI=
=R1FD
-----END PGP SIGNATURE-----

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