Support

Admin Tools

#40302 404 Error pages coming up on entire website except home page

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.0.2
PHP version
8.1.27
Admin Tools version
7.4.8

Latest post by nicholas on Thursday, 22 February 2024 02:40 CST

Knightrider2112

Hello,

We're having an issue at the above listed website, to where articles are showing 404 server errors, if I turn off the SEO Search Engine Friendly URLs in the Global Configuration panel inside of joomla all the pages start working again but with the long links and article ID's showing up which we don't want. One of the things we found online was someone mentioning that the .htaccess file created using Admin Tools could be the issue. Now we just recently within the past year or so migrated from Joomla 3 4 and now 5 seems to have the error. I'm wondering if the .htaccess file that we have created a while back with Admin Tools could have something in there that is interfering. We've never had this issue until now. Any help would be great. Thanks in advance. 

 

Warm regards
Eric  

 

nicholas
Akeeba Staff
Manager

No, the .htaccess created by Admin Tools is most definitely not the issue. Let's forget for a minute the fact that the URL of this here ticket (https://www.akeeba.com/support/admin-tools/40302-404-error-pages-coming-up-on-entire-website-except-home-page.html) is SEF and works great on this here site which of course uses Admin Tools' .htaccess Maker since the .htaccess Maker was nothing else than me turning my Master .htaccess file into a something a non-technical person can use. It is immediately obvious to anyone who opens the Admin Tools-generated .htaccess file that there is a clearly marked Joomla! SEF section which is identical to the one that Joomla! ships with in its (inert) htaccess.txt file.

The problem is that your server either does not have Apache's mod_rewrite installed, or it does not support .htaccess files at all. Either way, the generated .htaccess file would basically do nothing. Please ask your host for a clarification about that.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Knightrider2112

Hi Nicolas,

 

And thanks for your response. I spoke with the tech support at my hosting provider and here is what they said. 

 

#1 - Ok so yes, mod_rewrite (rewrite_module) is installed and I do not see any issues with it at all, here is my terminal output when checking: root@vps42816 [~]# apachectl -M | grep rewrite rewrite_module

 

#2 - I know that they told you that the .htaccess has nothing to do with it ,but I can tell you from experience that is not always the case, and that is the first place to check

 

#3 - It sounds like something possibly happening with the SEO module and the .htaccess

 

#4 - I reviewed the .htaccess file in question (.htaccess.admintools) and yes, the syntax is correct, but I have a feeling that there may be conflicting directives that cause this to happen once enabled, so the main directive: ##### Joomla! core SEF Section -- BEGIN RewriteCond %{REQUEST_URI} !^/index\.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [L] ##### Joomla! core SEF Section -- END May be conflicting (but the syntax is correct) with something else happening when the tool is enabled. 

But to be clear, the syntax is not the issue But conflicting directives may be the culprit   #5 - I would say have him review the directives he has setup, because as we both can see (and he can) when it is enabled, all pages go 404, but when turned off, no issues, and when it is enabled the .htaccess file is the one being called, so I would say have him check the .htaccess file when enabled/disabled.  I know he may not believe so, but the proof is in the pudding so to speak, and that .htaccess file is the only thing that makes sense in this case.   Again I've never had an issue like this with Admin Tools, it's an excellent piece of software but could there be something else there that we're not seeing. This has never happened to ANY of our websites ever using Admin Tools as I've stressed but according to the transcript you're reading above there may be something more we're not seeing. Any help would be greatly appreciated. I look forward to your response.   Thanks in advance Nicolas Eric  

nicholas
Akeeba Staff
Manager

As I said, I started maintaining my own Master .htaccess file in late 2008. It was so good, that Joomla! copied it into its security documentation as the "recommended" .htaccess file in 2011. You can track the history of the page and see that it was NOT me who proposed that (I only found out much later). The .htaccess Maker first appeared in Admin Tools back in September 2010 and it's nothing else than a GUI to configure that very same Master .htaccess file I had been maintaining since 2008.

The .htaccess Maker generated .htaccess file of course works. It's been used on hundreds of thousands of Joomla! sites since 2010. Not only our own site relies on it – we are having this conversation on a SEF URL, right? – but I know for a fact we have several hundreds of clients on InMotion who use the .htaccess file generated by the .htaccess Maker successfully.

I can also tell you that the problem is not the Joomla! SEF section which is the very same one that is shipped with Joomla! itself: https://github.com/joomla/joomla-cms/blob/b0663caf261b4df5936e002f5882cee827d4a175/htaccess.txt#L98-L125 I understand his confusion. This is the final part of the .htaccess rewrite rule set. When no other rule stops a request, it falls through to the SEF section to route the request to Joomla itself for handling, i.e. what it's supposed to do and how SEF URLs work with PHP.

A simple way to test what is going on is to disable all of the .htaccess Maker options and click on Save & Create .htaccess. This creates a very minimal .htaccess file which is basically just the SEF section. If this does not work, go back to the .htaccess Maker and scroll all the way to the bottom. Did you mess up the domain names in the HTTP and HTTPS host options? This needs to be a bare domain, e.g. www.example.com NOT https://www.example.com. If it worked, start re-enabling the options you had before. Do it one at a time, clicking Save & Create .htaccess after enabling each one, testing a few SEF URLs, until you find what is causing you a problem.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!