Enabling default .htaccess (for SEF) breaks Joomla website

After enabling .htaccess (by renaming htaccess.txt to .htaccess) on one of my test websites I found that website is broken and Apache throws following error:

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@domain.com 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.

Checking Apache error.log file revealed following error:

[Thu Oct 01 13:14:24 2011] [alert] [client 192.168.1.154] /var/web/test/site1/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration

This made it clear that issue is caused by not enabled mod_rewrite module.

Following 2 commands solved the problem:
sudo a2enmod rewrite
sudo /etc/init.d/apache2
restart

Joomla 1.5
Joomla 1.6
Joomla 1.7


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *