这个重写规则是什么意思啊多谢

WBOY
Release: 2016-06-13 13:49:53
Original
917 people have browsed it

这个重写规则是什么意思啊?谢谢
RewriteRule ^(/)$ %{HTTP_HOST}$1 [C]

这个不知道什么意思

------解决方案--------------------
把"/"重写成"http://yourhostname.com/",其中%{HTTP_HOST}表示主机名,$1表示第一个子模式所匹配的字符串,在这个案例中就是"/"了。至于[C]表示该条规则和下个连用,你可以去Apache官网上找到相关说明:http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!