need simple explantion about .htaccess

Tag: .htaccess Author: kisha Date: 2009-11-22

i using it and use RewriteEngine and i saw recently some text in the right side of RewriteEngine like that [L,QSA] what this mean and [L] can eny one give me full list of them and usage for each one

Best Answer

They're documented at the mod_rewrite docs page:

'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. Remember, however, that if the RewriteRule generates an internal redirect (which frequently occurs when rewriting in a per-directory context), this will reinject the request and will cause processing to be repeated starting from the first RewriteRule.

'qsappend|QSA' (query string append)
This flag forces the rewrite engine to append a query string part of the substitution string to the existing string, instead of replacing it. Use this when you want to add more data to the query string via a rewrite rule.


thanks Greg for this

Other Answer1

There is also a good cheat sheet here which I've found helpful.