Support

Admin Tools

#21851 Problems with Joomla Installs in sub-folders

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 nicholas on Wednesday, 14 January 2015 05:41 CST

kecker
So I have a Joomla site (let's call that site A) installed at a root folder, which is still 2.5.28 and I want to work on upgrading it to Joomla 3.3.x. But before I do that I wanted to make a copy of the site in a sub-folder so I can make sure the upgrade will go well before I do it on a live site.

So I used my Akeeba BAckup file and kickstart to "restore" a version of the site in a sub-folder, we'll call that Site B.

So to even get kickstart working I had to add the sub-folder for Site B as an exception in the "Allow direct access, including .php files, to these directories" area of the .htaccess tool. Okay no big deal.

So the restore goes fine and Site B is supposedly up and running. Backend of Site B works fine and the front page of Site B is fine, but if I try to use any link on Site B, such as clicking on an article, I get a 404 error.

Can't seem to figure out why and not sure if the problem is on the Admin Tools for Site A or Site B. I want to get Site B fully functional before I start playing around with upgrade stuff. I could just turn off Admin Tools on both but I'd prefer to have both functional in case of any conflicts.

dlb
The first two things to check are:
  1. $live_site in configuration.php. Sometimes you need to enter the url to Site B there, including the http:// but not including the trailing /. This problem is usually visible on the front page, so that probably isn't it.
  2. Check the RewriteBase in .htaccess. If it isn't commented out (line begins with #) then it must be pointed to the subfolder where your site is located. If you used .htaccess Maker, you need to fix the urls at the bottom of the screen and regenerate the .htaccess file.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

kecker
The second one is what I've been trying. Problem is that every time I try to change it on Site B instead of changing the Site B .htaccess, it changes the Site A .htaccess and then it breaks Site A instead of fixing Site B

nicholas
Akeeba Staff
Manager
You can't really fix this because of how Apache works :( The .htaccess of the web root (Site A's) is read when accessing the subdirectory (Site B) along with the .htaccess in the subdirectory. Then the directives are merged and applied as a whole.

This is why we warn against having sites in subdirectories. The proper way to deal with it is having the site in subdomains, with their filesystem directories NOT inside one another. This will work fine:
(account root)
   +--- public_html   (Site A - www.example.com)
   +--- sub1_html    (Site B - siteb.example.com)
   +--- other folders


Whereas the following will NOT work properly:
(account root)
   +--- public_html   (Site A - www.example.com)
          +--- siteB    (Site B - siteb.example.com)
   +--- other folders

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!