Rewrite index.php and index.html in .htaccess
Using .htaccess
, how can I rewrite the URL, such that when a visitor types:
http://www.domain.com/index.php
http://www.domain.com/index.html
they will be redirected to http://www.doma开发者_C百科in.com/
.
I tried it with redirection, but it takes me in the loop...
Please if you could help me with this.
RewriteEngine On
RewriteRule ^index\.(php|html?)$ http://www.mydomain.com/ [R=301,L]
精彩评论