Report this

What is the reason for this report?

Joomla SEF URLs not working on Ubuntu

Posted on August 26, 2016

Hi 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



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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
</Directory>

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.