See, the critical information you're not telling me here and you're not considering yourself is that you were developing the site in a subdirectory (or a subdomain whose web root was a subdirectory of the main site; the same thing applies).
First, the PHP version was set to 8.2;
This create a .htaccess
file in the main web root of the domain.
Second, the Joomla installer was run
This has no effect on the .htaccess file in either the main web root, or the subdirectory where you installed your site, because Joomla! neither comes with one, nor does it ever create a .htaccess
file.
Remember, merely Joomla! ships an inert file (htaccess.txt
, ignored by your web server) which you'd have to rename to .htaccess yourself to enable SEF URLs.
Third, Admin Tools was installed;
This created a new .htaccess
file in the folder where you had installed your site.
Fourth, the .htaccess file was recreated by Admin Tools (numerous times, actually).
At this point the .htaccess
file was overwritten, in the folder where you had installed your site. Same as above.
At each re-generation, the last line, the PHP handler, was kept in place.
Nope, there was never a PHP handler line in the .htaccess
file in your site's subdirectory.
You seem to forget that .htaccess
files cascade over filesystem folders, as per the official documentation of Apache, your web server.
If you are developing on a subdirectory, regenerating the .htaccess
file with Admin Tools only overwrites the .htaccess
file in the subdirectory. It does NOT touch the .htaccess
in the main web root folder (one folder level above your site) which is where your host had created the .htaccess
file in your first step.
Moreover, since .htaccess
files cascade, that sole line on that .htaccess file in the main web root was also applied to your site in the subdirectory. So, you got PHP 8.2 despite the fact the .htaccess
file in your site's subdirectory never had that line, because that line was cascaded (inherited) from the .htaccess
file one folder level above your site.
It was only after migrating the new site to its final location that this line was not kept.
At this point you moved your site from a subdirectory to the site's root. By doing so you replaced the .htaccess file in the site's root.
However, you used Akeeba Backup to do it which means that you also used Kickstart. Kickstart, together with Akeeba Backup's restoration script (ANGIE) can handle that PHP handler automatically, transcribing it to the bottom of the .htaccess
file as it is extracted. In fact, the .htaccess
file in the backup archive is always extracted as htaccess.old so as not to interfere with the restoration process, and gets renamed back to .htaccess
(and has the PHP handler line transcribed) at the very last step of the restoration script. This is a simple mechanism we have in place that works on ~99% of sites to prevent users shooting themselves in the foot, as you were about to do. I guess it works a bit too well because you never noticed.
The next time you used Admin Tools to regenerate a .htaccess
file, it overwrote that file with a new one which no longer had the AddHandler line, hence your 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!