How to Fix Joomla URLs Returning 404 After Enabling URL Rewriting
If Joomla pages start returning 404 errors immediately after you enable Use URL Rewriting, Joomla is usually generating clean URLs correctly but the web server is not rewriting those requests back to Joomla's index.php. The home page may still work while article, category, component, or menu URLs fail.
Temporarily turn URL Rewriting off to confirm the cause
- Sign in to the Joomla Administrator.
- Go to System → Global Configuration → Site.
- In the SEO settings, set Use URL Rewriting to No.
- Save the configuration and retest a page that was returning 404.
If the page works again, the Joomla content and menu item are probably fine. The problem is in the web-server rewrite configuration. Leave Search Engine Friendly URLs enabled if you want SEF URLs; the two settings are related but not identical.
For Apache, make sure Joomla's .htaccess file is actually active
A standard Joomla package includes htaccess.txt. On Apache, URL rewriting normally requires that file to be renamed to .htaccess in the Joomla root directory.
Your Joomla root is the same directory that contains files and folders such as:
configuration.php
index.php
administrator/
components/
plugins/
If both htaccess.txt and .htaccess exist, do not overwrite the active .htaccess without reviewing it first. Hosting providers, security tools, and previous administrators may have added important rules.
Confirm that Apache permits rewrite rules
Joomla's .htaccess rules depend on Apache rewrite support and on the server allowing rewrite directives for the site. If renaming the file does not solve the problem, confirm with your hosting provider that:
- Apache's rewrite module is available;
- the site's configuration allows the needed
.htaccessoverrides; - no parent-directory rule or hosting security rule is intercepting the request first.
A server-level configuration error can also produce a 500 error instead of a 404. Check the web-server error log after requesting one of the failing URLs.
If Joomla is installed in a subdirectory, review RewriteBase
A Joomla site installed below the domain root—for example https://example.com/site/—may require a correct RewriteBase setting depending on the server configuration.
Open the Joomla root .htaccess file and review the commented RewriteBase guidance. For a site installed in /site, the appropriate value may be:
RewriteBase /site
Do not copy that value to a root-domain installation. The correct setting depends on the Joomla installation path and web-server configuration.
Nginx and Microsoft IIS need their own rewrite configuration
Joomla's Apache .htaccess file does not configure Nginx. If the site uses Nginx, the server block must include routing that sends requests for non-existent files/directories to Joomla's front controller. This is a hosting/server configuration change, not something Joomla can enable by renaming htaccess.txt.
Microsoft IIS likewise uses its own rewrite configuration. Confirm which web server is actually handling the site before applying Apache-specific instructions.
Re-enable URL Rewriting and test direct page requests
After correcting the server configuration, return to System → Global Configuration → Site, enable Use URL Rewriting, and save.
- Open the home page.
- Open several menu links.
- Paste a deep SEF URL directly into a new browser tab instead of reaching it through navigation.
- Test URLs from different components, not only Articles.
- Clear Joomla, hosting, CDN, and browser caches if old redirects or 404 responses persist.
If only one URL still returns 404 while other rewritten URLs work, the global rewrite configuration is probably functioning. Investigate that page's menu item, alias, routing, access level, published state, or extension-specific router instead.
Need More Help with Joomla?
Still having trouble? Open a support ticket with QuantaCade Support and we'll be happy to help where we can.
Support priority is given to QuantaCade products, services, and customers. However, we're also happy to assist fellow Joomla users with general Joomla questions and troubleshooting when possible.
QuantaCade is an independent Joomla extension developer and is not official Joomla support. Some issues involving third-party extensions, hosting environments, server configurations, or other systems outside our development control may be beyond what we're able to resolve.