how do you make Joomla return a "real" 404 code? I can't figure out how to make this happen! I have changed htaccess.txt
to .htaccess
, enabled the system / redirect plugin, and turned on rewrite URLs in the the Joomla global options.
However, any fake URL I type in simply redirects to the homepage, not even to the default Joomla error page.
This also happens even on the Joomla demo site here: https://demo.joomla.org/badurl_fake
Testing further:
Joomla Global Use Rewrite: OFF
Joomla htaccess.txt renamed: NO
Joomla redirect plugin enabled: NO
This results in a bad URL returning a true 404 error
Joomla Global Use Rewrite: ON
Joomla htaccess.txt renamed: NO
Joomla redirect plugin enabled: NO
This results in a bad URL returning a true 404 error
Joomla Global Use Rewrite: ON
Joomla htaccess.txt renamed: NO
Joomla redirect plugin enabled: YES
This results in a bad URL returning a true 404 error
Joomla Global Use Rewrite: ON
Joomla htaccess.txt renamed: YES
Joomla redirect plugin enabled: YES
This results in a bad URL returning user to homepage
Joomla Global Use Rewrite: OFF
Joomla htaccess.txt renamed: YES
Joomla redirect plugin enabled: YES
This results in a bad URL returning user to homepage
Joomla Global Use Rewrite: OFF
Joomla htaccess.txt renamed: YES
Joomla redirect plugin enabled: NO
This results in a bad URL returning user to homepage
So it seems to me that the htaccess is the culprit here. In my testing, anytime the .htacess is present, the 404 is redirected to the index page.