Apache rewrite, home page

て烟熏妆下的殇ゞ 提交于 2020-01-16 14:47:12

问题


I am trying to rewrite the "home page" of the website to www.example.com.

The home page right now can be accessed via www.example.com/dir/userdo?action=home

My thoughts are www.example.com is really www.example.com/index.html since apache auto hide the /index.html, so I tried

RewriteRule /index.html /dir/user.do?action=home [PT,L]

which does not work.

Can someone give me an idea the right approach to this problem? Thanks


回答1:


RewriteRule ^/$ /dir/userdo?action=home [L]

the default index.html can be changed with DirectoryIndex directive.



来源:https://stackoverflow.com/questions/8425629/apache-rewrite-home-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!