Contents
What does NC mean in Apache?
Use of the [NC] flag causes the RewriteRule to be matched in a case-insensitive manner.
What is NC In redirect?
Explanation of this .htaccess 301 redirect: The [NC] specifies that the http host is case insensitive. The escapes the “.” – because this is a special character (normally, the dot (.) means that one character is unspecified). The final line describes the action that should be executed: RewriteRule ^(.*)$ http://www.
What are Apache rules?
Each rule can have an unlimited number of attached rule conditions, to allow you to rewrite URL based on server variables, environment variables, HTTP headers, or time stamps. mod_rewrite operates on the full URL path, including the path-info section. A rewrite rule can be invoked in httpd. conf or in .
What happens when a rewriterule does not match?
That is, if the rule matches, then it is processed as usual and control moves on to the next rule. However, if it does not match, then the next rule, and any other rules that are chained together, are skipped. The [CO], or [cookie] flag, allows you to set a cookie when a particular RewriteRule matches.
How are flags separated in a rewriterule pattern?
A RewriteRule can have its behavior modified by one or more flags. Flags are included in square brackets at the end of the rule, and multiple flags are separated by commas. RewriteRule pattern target [Flag1,Flag2,Flag3] Each flag (with a few exceptions) has a short form, such as CO, as well as a longer form, such as cookie.
How is the behavior of a rewriteule modified?
The behavior of a RewriteRule can be modified by the application of one or more flags to the end of the rule. For example, the matching behavior of a rule can be made case-insensitive by the application of the [NC] flag: For more details on the available flags, their meanings, and examples, see the Rewrite Flags document.
What does the current Uri mean in rewriterule?
The current URI can be the initial URI as requested by the client, the result of a previous round of mod_rewrite processing, or the result of a prior rule in the current round of mod_rewrite processing.