Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After few tries i found out that

RewriteEngine On

RewriteRule .* index.php

was not working but

RewriteEngine On

RewriteRule .* index.html 

was working, what could be the possible reason? and how can i fix it?

share|improve this question
Do you get the same error when requesting index.php without any rewrite rules set? – beans Feb 2 '11 at 17:49
What happens when – borayeris Feb 2 '11 at 18:15
for first case i get error Internal Server Error for second case i get routed to index.html file – Santosh Linkha Feb 2 '11 at 18:15
Are u working on local? – borayeris Feb 2 '11 at 18:15
sure that index.php is working or there's a bug? – Nicola Boccardi Feb 2 '11 at 18:39
up vote 1 down vote accepted

Try(loop free):

RewriteEngine On
RewriteRule ^.*$ index.php [L]
share|improve this answer
thanks your answer was certainly helpful, but could you please modify your code optimized for zend framework .htaccess – Santosh Linkha Feb 3 '11 at 4:12


RewriteEngine On
RewriteRule (.*)$ index.php
share|improve this answer
getting the same error – Santosh Linkha Feb 2 '11 at 17:31

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.