> Without the L-flag, and after /a has been substituted with /b, the second 
> rule would be tested not against /b but against http://[host]/b, so the 
> result is not /c. 

This is where my misconception about immediate redirection with the R flag 
comes from. Should look at the code some more.

> RewriteRule /b /c

But here the pattern would also match /a/b/d which was not necessarily the 
intention.

Back to 

RewriteCond %{HTTP_REFERRER}<>$1 !(/test/.+)<>\1$

Could you elaborate a little about the syntax ? I have never seen anything like 
this in the mod_rewrite manual page nor in the URL Rewriting Guide... but it 
obviously works as far as I can tell from having given it a go. \1 is obviously 
a back-reference, but <> ?

-ascs


-----Original Message-----
From: Robert Ionescu [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 29, 2006 10:32 PM
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] mod_rewrite

Axel-Stéphane SMORGRAV wrote:
>> Rules below would be tested, but they wouldn't match unless the pattern 
>> starts with scheme + :// + url-path.
> 
> unless the RewriteCond pattern starts with /. The above matches just fine.

I meant this hypothetical case

RewriteRule ^/a /b [R]
RewriteRule ^/b /c

Without the L-flag, and after /a has been substituted with /b, the second rule 
would be tested not against /b but against http://[host]/b, so the result is 
not /c.
So removing the L flag in that case won't change r->filename to /c

while using

RewriteRule ^/a /b [R]
RewriteRule /b /c

would now end up in /c and no external redirection takes place at all.

--
Robert

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