What does this rewrite rule mean? thanks-php Tutorial

Source: Internet
Author: User
What does this rewrite rule mean? Thank you for RewriteRule ^ () $ % {HTTP_HOST} $1 [C]. what does this mean? solution ------------------ rewrite & quot; to & quot; yourhostname.com & quot;, where % {HTTP_HOST} indicates the host name, and $1 indicates the rewrite rule that matches the first submode. what does this mean? Thank you.
RewriteRule ^ (/) $ % {HTTP_HOST} $1 [C]

What does this mean?

------ Solution --------------------
Rewrite "/" to "http://yourhostname.com/", where % {HTTP_HOST} represents the host name, $1 represents the string that the first sub-pattern matches, in this case it is. As for [C] said the rule and the next used, you can go to the Apache official website to find the relevant instructions: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule

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.