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

WBOY
Release: 2016-06-13 12:02:28
Original
949 people have browsed it

求一条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
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