Apache rewrite, home page

2019-08-19 06:04发布

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条回答
Viruses.
2楼-- · 2019-08-19 06:24

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

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

查看更多
登录 后发表回答