当前位置:首页 > 服务器技术 > 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

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

真心感谢你这样无私分享的人。
【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!