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

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
1  
Is the mod_rewrite module loaded? Do you have a /etc/apache2/mods-enabled/rewrite.load symlink? –  andol Aug 8 '10 at 20:16
1  
Did you look in the error log? –  freiheit Aug 8 '10 at 20:36
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.