Support

Admin Tools

#30735 htaccess and addon domains

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
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Friday, 08 February 2019 17:17 CST

Mobilepro
Hello -

I'm having a strange problem with an add-on domain that I can't figure out how to fix in AT and hope you can help with.
The website loads ok but I'm seeing a lot of file not found 404 errors with several components and plugins in both the front and back end causing odd problems with forms etc.

If I add exceptions in "Allow direct access, including .php files, to these directories" with all the components and plugins directories the errors go away but normally I shouldn't have to do that.

The document root of the add-on domain is a folder under the primary domain so I've also tried putting an exception in the Primary domains AT htaccess file for the add-on domain folder but that doesn't seem to help.

I'm sure I'm over thinking this and it's something stupid I've just missed but I've hit a wall.

Thanks for the help.

nicholas
Akeeba Staff
Manager
I'm afraid you won't be able to do much. .htaccess files cascade. Apache reads the .htaccess file of the main site, then the .htaccess from the add-on site and tries to apply the combined rules. However, the protection of the main site gets in the way because of the way the core Joomla! SEF rules (also included in the .htaccess created by the .htaccess Maker) are applied by Apache in this case.

The only real solution is to move the add-on site's root to a folder outside the public_html of the main site.

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!

Mobilepro
Thanks for your insight on this. What was really confusing me is when I added exceptions in the add-on site htaccess Maker it shouldn't have worked if it was being restricted by the main site.

Thanks again

nicholas
Akeeba Staff
Manager
Because of the way .htaccess cascading works some rules in the add-on domain will work because they are more specific than the rules on the main site. The problem is that specificity is complicated. Hence the suggestion to sidestep the problem altogether :)

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!

Mobilepro
Got it...this was a little outside of AT support so I appreciate you taking the time to help.

nicholas
Akeeba Staff
Manager
No problem! I'm glad I could help a bit :)

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!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!