Support

Admin Tools

#13196 hide joomla subfolder for browser

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, 08 August 2012 06:48 CDT

user67172
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? YES
Have I searched the tickets before posting? YES
Have I read the documentation before posting (which pages?)? YES
Joomla! version: 2.5.6
PHP version: 5.3.14
MySQL version: 5.5.24-cll
Host: (optional, but it helps us help you)
Admin Tools version: 2.3.1 PRO

Description of my issue:

I have Joomla! installed in a separate subfolder (because I have other web applications side-by-side on the same site-root)

I found this relevant post by Chacapamac:
https://www.akeebabackup.com/component/ats/ticket/admin-tools/10069-htaccess-joomla-in-a-subfolder.html

This describes the two .htaccess files:
1) in the root folder (this is similar to the Bluehost.com-file posted by Chacapamac)

2) in the joomla subfolder. This is generated by the Akeeba Tools (Pro)

The navigation and templating seems to work, however the user can still see the 'joomla' subfolder in the URL's (both in the adress bar and when hovering over menues. How can I hide it for the client?

nicholas
Akeeba Staff
Manager
I believe you simply need to replace YOURSITENAME.com and YOURSUBFOLDER with the real domain name and folder name of your site.

Please note that as I said in that ticket, this is a Bad Idea™. The best workaround is to simply backup your site and restore it to the domain's root. As I always say, you should never use your left foot to scratch an itch on your right cheek :)

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!

user67172
Thanks, but that was in place (and now re-checked) - but the outcome is still as described.

I am a bit curious on exactly why you advise against a separation in different sub directories for different webapplications (CMS, webshop, forum, blog, etc ). I think of it as good housekeeping on the site. But maybe I am making a wrong decision or have a little misunderstanding;-)

As an example, my goal is to have the following subdomain mappings to physical directories:

// all these are handled by the Joomla! CMS
site.no -> public_html/joomla
mobile.site.no -> public_html/joomla/
m.site.no -> public_html/joomla/
www.site.no -> public_html/joomla/

// these are for specific web applications
shop.site.no _> public_html/shop/
forum.site.no _> public_html/forum/

I thought perhaps it was a candidate for mod_rewrite, but maybe there are better ways to accomplish this...

nicholas
Akeeba Staff
Manager
Just to make it clear, I do NOT advise against separating different web application to different subdirectories. In fact, it's pretty much the only way you can do it (due to same-named directories and files across different CMS, forums, etc). I advise against the following:
  • Separating your one Joomla! site to a different Joomla! site per component. It's a ridiculous idea, really (but I've heard of people pursuing it!). It does not minimise your security exposure area, it maximises it (the exact reasons are wort a book or two).
  • If you put a site in a subdirectory, do not try to use .htaccess or other tricks to make the subdirectory disappear. Due to the nature of web requests, you are heading to a world of pain and suffering. Forms might stop working. This is because most browsers will drop the POST data when they see a redirection. And several other reasons.


What you can do is install Joomla! in the site's root and each non-Joomla! script in its own subdirectory. It's so simple :) In your case:
// all these are handled by the Joomla! CMS
site.no -> public_html
mobile.site.no -> public_html
m.site.no -> public_html
www.site.no -> public_html

// these are for specific web applications
shop.site.no _> public_html/shop/
forum.site.no _> public_html/forum/

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!

user67172
Sorry that I misunderstood your intention, and I see your point in a security context.

But having Joomla all over the site root seems unaccustomed for me - need more time to adapt to that school-of-thought.

By the way, I got it working as I believe it should be:

1) I set the $live_site="http://site.no/"
(no joomla subfolder)

2) In Akeeba Tools, I set both http and https requests to "site.no"
(still keeping the joomla as basedir here)

I get a 303 "See Other" response which I understand should be the appropriate one to get.
http://en.wikipedia.org/wiki/HTTP_303

You are welcome to try if you are sceptical. (google for "bergkameratene swimming")

Thank you also for the great .htaccess editor, I think I have improved both my skills and site by using it. Glad I subscribed even if the free tools seems solid an useful.

nicholas
Akeeba Staff
Manager
Well, if it works for you and you're satisfied, it's OK with me :) Just keep an eye for forms failing to submit.

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!

user67172
Thanks again, submitted a couple of forms and they works as before:)

I have one suggestion to improve the self-service on your site: The keyword searchbox is limited to 20 characters. Space to specify more keywords should shorten the hitlist a good bit when you know the terms.



nicholas
Akeeba Staff
Manager
I am going to replace the search box with Joomla! 2.5's Smart Search. The major issue is lack of time. I need to find a lot of time to create a Smart Search plugin for our documentation component.

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!