Home >Backend Development >PHP Tutorial >求一条apache地址重写则规解决方案

求一条apache地址重写则规解决方案

WBOY
WBOYOriginal
2016-06-13 12:02:28979browse

求一条apache地址重写则规
求一条apache地址重写则规
1、当在url输入http://xx.aaa.com时访问http://xx.aaa.com/xx/index.html
      当在url输入http://yy.aaa.com时访问http://yy.aaa.com/yy/index.html
------解决方案--------------------
RewriteCond %{HTTP_HOST} ^([^\.]+).aaa.com$
RewriteRule ^(/?)(.*)$ /%1/index.html [PT,L]

------解决方案--------------------

引用:
RewriteCond %{HTTP_HOST} ^([^\.]+).aaa.com$
RewriteRule ^(/?)(.*)$ /%1/index.html [PT,L]


+1
Statement:
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