当前位置:首页 > 服务器技术 > apache

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

求一条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
【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!