Redirect and Hide Sub-Directory

General questions relating to Joomla! 2.5. Note: All 1.6 and 1.7 releases have reached end of life and should be updated to 2.5. There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
socsci
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jan 19, 2013 1:55 am

Redirect and Hide Sub-Directory

Post by socsci » Sat Jan 19, 2013 1:59 am

I'm new to Joomla and have a question about redirecting and hiding the subdirectory where the actual installation lives.

Our site is running Joomla! 2.5.8 on an Apache server. I have the latest version of Akeeba Admin Tools installed and the .htaccess Maker activated. We're using the RocketThemes Graffito Theme.

The site is installed in a subdirectory:

http://www.fearlessstudio.com/joste/

Links to articles now look like this:

http://www.fearlessstudio.com/joste/ind ... ess-studio

I would like to direct http://www.fearlessstudio.com/ to show the contents of http://www.fearlessstudio.com/joste/ , but hide the subdirectory.

So, instead of this:

http://www.fearlessstudio.com/joste/ind ... ess-studio

I'd like it to be:

http://www.fearlessstudio.com/info/fearless-studio

I'm at a loss. I've spent days reading through various sites, but none of their use cases quite match our conditions. Could someone offer some helpful code suggestions for my .htaccess file?

Thanks so much!

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: Redirect and Hide Sub-Directory

Post by ranwilli » Sat Jan 19, 2013 2:57 am

Is there a GOOD reason you can't just move Joomla to the fearlessstudio.com root? It's a quick and fairly painless two step process.
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

socsci
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jan 19, 2013 1:55 am

Re: Redirect and Hide Sub-Directory

Post by socsci » Sat Jan 19, 2013 12:28 pm

Thanks for your reply, ranwilli. Yes, there is a good reason Joomla isn't installed in the root. I'm comfortable moving it, if I have to. However, as things progress, other software will be residing on the site and I don't want those applications mingled with the Joomla files.

As I understand it, I need one htaccess file in the root to redirect file paths into the sub-directory and then rewrite the base to remove the sub-directory and index.php from the displayed URLs.

I tried a work around with two htaccess files (one in the root and the other in the subdirectory, which I understand is not best practice), but that worked for about a week before breaking yesterday.

User avatar
ranwilli
Joomla! Master
Joomla! Master
Posts: 19203
Joined: Sun Feb 19, 2006 6:47 pm
Location: Toledo, OH
Contact:

Re: Redirect and Hide Sub-Directory

Post by ranwilli » Sat Jan 19, 2013 1:29 pm

Code: Select all

RedirectMatch permanent ^/$ http://mydomain.com/php/index.php
Don't HACK the Joomla! core, Instead "Extend" and/or "Override."
Stay ON the update path.
https://harpervance.com

socsci
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Jan 19, 2013 1:55 am

Re: Redirect and Hide Sub-Directory

Post by socsci » Sat Jan 19, 2013 1:39 pm

Thanks. I'll give RedirectMatch a shot. :)


Locked

Return to “General Questions/New to Joomla! 2.5”