Apache rewriterule pattern scope URL-Path

Source: Internet
Author: User

Today, I have been wondering what the scope of Apache rewriterule pattern is. From the Apache rewrite configuration of my company, I think it works on Uri. But I see the http://lamp.linux.gov.cn/Apache/ApacheMenu/mod/mod_rewrite.html (APACHE Chinese Reference Manual), which is written as follows:

PatternIs a Perl-Compatible Regular Expression acting on the current URL. "Current URL" refers to the value of the URL when the rule takes effect. It may be different from the requested URL, because other rules may have been matched before and modified.

In this section, I understand that pattern applies to URLs, that is, QUERY_STRING. This made me puzzled, and finally I went to the Apache official website to see (http://httpd.apache.org/docs/current/mod/mod_rewrite.html), found that the pattern scope should initially be URL-path (similar to Uri, is there any difference?) the original article is as follows:
PatternIs a Perl Compatible
Regular Expression. On the first rewriterule it is applied to the (%-decoded)
URL-path of the request; subsequent patterns are applied to the output of the last matched rewriterule.

I found that there are some differences between Chinese reference documents and Apache official English documents, so I suggest you try your best to refer to the original English version for explanations when you encounter problems.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.