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

I have AllowOverride All in /etc/apache2/sites-available/default.

I added .htaccess with the following code.

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Without this htaccess, I am able to see the web page. but after adding this I am not able to see it. I get the following error.

Could anyone tell me how to fix the problem?

Thanks in advance.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log. Apache/2.2.14 (Ubuntu) Server at localhost Port 80

share|improve this question
Is the mod_rewrite module loaded? Do you have a /etc/apache2/mods-enabled/rewrite.load symlink? – andol Aug 8 '10 at 20:16
Did you look in the error log? – freiheit Aug 8 '10 at 20:36

What's $1 in the REQUEST_COND? Shouldn't it be REQUEST_FILENAME?

RewriteEngine on RewriteCond $REQUEST_FILENAME !^(index\.php|images|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L]

share|improve this answer

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.