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, This email address is being protected from spambots. You need JavaScript enabled to view it. 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  

Reverend Bacon
# Reverend Bacon 2012-12-05 23:12
Thank you! This saved me! :-)

Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait