In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The main content of this article is to explain "what are the RewriteRule grammar rules of htaccess files". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the grammar rules of RewriteRule in htaccess files"?
RewriteRule grammar rules
#-indicates a comment at the beginning of the line.
[F]-- Forbidden (prohibited): command server returns 403Forbidden error to user browser
[l]-- Lastrule (the last rule): tell the server to stop rewriting URL after the execution of this rule. Stop the rewrite operation immediately and no other rewrite rules are applied. It corresponds to the last command in Perl or the break command in C language. This flag is used to prevent the URL that has currently been rewritten from being rewritten by subsequent rules. For example, you can use it to override the URL ("/") of the root path to the actual URL (for example, "/ e/www/").
[n]-- Next (next rule): tell the server to continue rewriting, instructing all rewrite instructions to be executed. Re-perform the rewrite operation (restart from the first rule). At this point, the URL that is processed again is no longer the original URL, but the URL that has been processed by the last rewriting rule. It corresponds to the next command in Perl or the continue command in C language. This tag restarts the rewrite operation (immediately back to the beginning of the loop). But be careful not to create an endless cycle!
[G]-- Gone (missing): the command server returned a 410GONE (nolongerexists) error message
[P]-- Proxy (agent): tell the server to process user requests through the mod_proxy module
[C]-- Chain (bundling): tell the server to bind the current rule to the previous rule
"redirect | R [= code]" (forced redirection)
What do you pay attention to in RewriteRule grammar?
When using this tag, you must make sure that the replacement field is a valid URL. Otherwise, it will point to an invalid location! And keep in mind that the tag itself only prefixes the URL, and the rewrite continues. Usually, you will also want to stop the rewrite operation and redirect immediately, so you also need to use the "L 'flag.
At this point, I believe you have a deeper understanding of "what are the RewriteRule grammar rules of htaccess files?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.