Some useful flags (N, NC and QSA) for Apache server rewrite rules
There are many flags available for Apache rewrite rules. Here we will talk about 3 useful flags- N, NC and QSA
N|next-> [N] or Next flag causes the ruleset to start over again from the top. Use with extreme caution, as it may result in loop.
NC|nocase-> [NC] or No Case flag causes the rewrite rule to match in a case-insensitive manner. That is, it doesn’t care whether letters appear as upper-case or lower-case in the matched URI.
QSA|qsappend-> [QSA] or Query String Appended flag causes the target URI to append the query string of the source URI. The default behavior of RewriteRule is to discard the existing query string, and replace it with the newly generated one. Using the [QSA] flag causes the query strings to be combined.