Joomla Installation in subdirectory - how can I redirect?

Joomla versions 2.5, 1.7 and 1.6 are all end-of-life since December 31st 2014 and are no longer supported. Please use Joomla 3.x instead.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
MarcSchuhmacher
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sat Apr 05, 2014 10:46 am

Joomla Installation in subdirectory - how can I redirect?

Post by MarcSchuhmacher » Tue May 06, 2014 9:52 am

Joomla 2.5 / VM2

Hi

I installed my Joomla in a subdirectory public_html/subdirectory since I read in some forum this would be a good idea if I plan to install several Joomla installations on my webserver.

Therefore I do not want to move my installation to the rootfolder public_html

Is there a way to keep my installation in the subfolder, but redirect from the root folder public_html to my subfolders (I tried with .htaccess in the rootfolder, but I could not get it work..)

Please assist

PS: I am a beginner

User avatar
TMDHosting
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Tue Nov 05, 2013 4:44 pm
Contact:

Re: Joomla Installation in subdirectory - how can I redirect

Post by TMDHosting » Tue May 27, 2014 4:17 pm

From your public_html folder you can create redirect to only on of your subfolders. So it will be wise to consider using subdomains instead.

If you use subdomains, you will be able to access your Joomla based website with links as:

subdomain.domain.com
www.tmdhosting.com
The Most Dedicated

User avatar
CircuitoX
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Sun Oct 25, 2009 10:48 pm
Contact:

Re: Joomla Installation in subdirectory - how can I redirect

Post by CircuitoX » Wed May 28, 2014 8:19 pm

Other option:
create a file Inndex.php in the root of the site and paste this code.

<?
Header ("HTTP/1.1 301 Moved Permanently");
Header ("Location: http://www.mydomain.com/subfolder/");
>

This code will redirect to sub directory when someone write www.mydomain.com
Paginas web en arequipa: http://arequipa.nestormina.com/
Diseño de paginas web en cusco: http://www.nestormina.com

faffer
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Wed Nov 05, 2008 10:30 am

Re: Joomla Installation in subdirectory - how can I redirect

Post by faffer » Thu Sep 11, 2014 7:24 pm

I'm in a similar position but I actually don't have or need multiple folders with different sites in, for various reasons I ended up installing the newer version of Joomla in a subfolder because I was cautious about going live with the it. So I have a folder called joomla which I guess I could copy off and then copy the contents back in at 'root' level (I'm using a web host service not running my own server), but this would mean deleting all the existing folders and files under root for the existing Joomla installation, which I'm a bit nervy about!

If there's an easy way of just redirecting 'mysite.com' to mysite.com/joomla (and possibly rewriting the URLs too) then I would be happy to do that. Is the index.php file edit by CircuitoX the best way? If so where in the file should those lines go? There's already an index.php at root.

Thanks


Locked

Return to “Installation Joomla! 2.5”