Jump to content

When to use [L]


AdRock

Recommended Posts

Where is the right place to put the [L] at the end of the rewrite rule?

Is it at the end of every rule or at the end of the last rule?

I noticed the problem i had in my recent post was that the rewrite rule was in the wrong place and not working.  I moved it and now it works.  So i was wandering if it goes on the last rule
Link to comment
https://forums.phpfreaks.com/topic/19279-when-to-use-l/
Share on other sites

[L] is the flag
[L] means Last, for Last Rule for that bit of code

I quote from
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

[code]
'last|L' (last rule)
Stop the rewriting process here and don't apply any more rewriting rules. This corresponds to the Perl last command or the break command from the C language. Use this flag to prevent the currently rewritten URL from being rewritten further by following rules. For example, use it to rewrite the root-path URL ('/') to a real one, e.g., '/e/www/'.
[/code]

Check the site, its about 3 quateres down the page
(HINT: Search a string from the above quote, you might find it quicker)
Link to comment
https://forums.phpfreaks.com/topic/19279-when-to-use-l/#findComment-86921
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.