[L] [R] [T] - What does it mean ?

Discussion in 'Apache' started by Camay123, Jul 18, 2008.

  1. #1
    In this url rewirte directive :

    RewriteRule ^(.*)/(.*)/(.*)\.html$ store.cgi?section=$1&id=$2&item=3 [L]

    Notice the RewriteRule [L], and sometime I see [R]

    What those does mean ? Any page to suggest a good reading on the subject ?
     
    Camay123, Jul 18, 2008 IP
  2. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #2
    • 'last|L' (last rule)
      Stop the rewriting process here and don't apply any more rewrite rules. This corresponds to the Perl last command or the break command in C. 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/'.
    • 'redirect|R [=code]' (force redirect)
      Prefix Substitution with http://thishost:thisport/ (which makes the new URL a URI) to force a external redirection. If no code is given, a HTTP response of 302 (MOVED TEMPORARILY) will be returned. If you want to use other response codes in the range 300-400, simply specify the appropriate number or use one of the following symbolic names: temp (default), permanent, seeother. Use this for rules to canonicalize the URL and return it to the client - to translate ``/~'' into ``/u/'', or to always append a slash to /u/user, etc.

    Anywayyy... you can find more info, each rewrite flag explained how it works and that does it do:
    http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
     
    pr0t0n, Jul 19, 2008 IP