Joomla SEF URLs not working on Ubuntu

August 26, 2016 215 views
Joomla Ubuntu 16.04

I have a droplet running Apache/2.4.18 (Ubuntu) and I have a Joomla 3.6.2 installation.
The website works fine with SEF URL rewriting disabled but if I enable URL rewriting then my pages (other than the home page) give a 404 not found error.
I have checked that mod_rewrite is running and it is.
I have built over 100 Joomla websites and never had this problem so I'm not sure what to try next.
Thank you

1 Answer

Joomla SEF URLs are dependent on two things in Apache that need to be configured differently than the default. The first is enabling mod_rewrite which it sounds like you have already done.

The second is to check your Apache virtualhost configuration and ensure that you have set AllowOverride All for your web root. This tells Apache that it can use settings that are specified in an .htaccess file instead of only those that are directly in the configuration files.

You should have a section similar to this inside your VirtualHost block in your configuration file in /etc/apache2/sites-enabled/:

<Directory "/var/www/html">
  AllowOverride All
Have another answer? Share your knowledge.