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

求一条apache地址重写则规

WBOY
WBOYOriginal
2016-06-23 13:53:37846browse

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

真心感谢你这样无私分享的人。
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
Previous article:tp 数据写入数据库问题Next article:携程api开发