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

求一条apache地址重写则规

WBOY
Release: 2016-06-23 13:53:37
Original
869 people have browsed it

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

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

真心感谢你这样无私分享的人。
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