Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

is it possible to do a rewrite rule in a htaccess that redirects from www.example.com/index.php, to www.example.com?


share|improve this question

1 Answer 1

up vote 1 down vote accepted

I am assuming that index.php is not the DocumentRoot for www.example.com and therefore you are just redirecting to the DocumentRoot. If so, use the following:

Redirect 301 /index.php http://www.example.com
share|improve this answer
Superb, thank you very much :) –  Probocop Jul 16 '10 at 0:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.