Jump to content

Archived

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

AdRock

When to use [L]

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

Share this post


Link to post
Share on other sites
I think it goes at the end of each rule because thats how others have done it.

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

×

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.