Youjoomla Support Forums (https://www.youjoomla.com/joomla_support/index.php)
-   General questions (https://www.youjoomla.com/joomla_support/forumdisplay.php?f=17)
-   -   Possible to redirect index page to sub folder? (https://www.youjoomla.com/joomla_support/showthread.php?t=5177)

connectw 01-05-2010 10:19 PM

Possible to redirect index page to sub folder?
 
I am just learning. I have installed several of the demo templates, each in it's own subfolder on my site, to avoid any conflicts in code while I learn.

Is it possible to have visitors to my site directed to one of the subfolders and make that that be the actual page that launches the site? or does joomla have to be loaded into the root of the site? I want to keep joomla in its own sub directory, I have wp in its own directoy and so on. For example- how can I make the demo3 be the place that visitors get to when they type in www.mysite.com?

/public_html/mysite.com/demo1
/public_html/mysite.com/demo2
/public_html/mysite.com/demo3

jaycburton 01-05-2010 10:34 PM

Quote:

Originally Posted by connectw (Post 23290)
I am just learning. I have installed several of the demo templates, each in it's own subfolder on my site, to avoid any conflicts in code while I learn.

Is it possible to have visitors to my site directed to one of the subfolders and make that that be the actual page that launches the site? or does joomla have to be loaded into the root of the site? I want to keep joomla in its own sub directory, I have wp in its own directoy and so on. For example- how can I make the demo3 be the place that visitors get to when they type in www.mysite.com?

/public_html/mysite.com/demo1
/public_html/mysite.com/demo2
/public_html/mysite.com/demo3

Hi - This is not a function of Joomla, but rather your host records directly, or in conjunction with something like cPanel, if you have that installed on your server. For example, you should be able to change your host record parameters so demo1.mysite.com points to /public_html/mysite.com/demo1, demo2.mysite.com to /public_html/mysite.com/demo2, etc., or change your addon domain settings in your server's control panel. Please refer to either the registrar where your domain is registered, or to your hosting provider's site for information on how to configure the appropriate solution.

Ardoris 01-06-2010 01:35 AM

Simplest and easiest way to do that is...

Create index.html for your domain.
Example:www.mysite.com/index.html

On index file, put following code.
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv=Refresh content="0;url=/demo1/"></head></html>

<!--
                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
-->

Or you can do 301 redirect if you want it be permanent using .htaccess file.

Create blank file and name it .htaccess if you don't have one already.
Insert following code to .htaccess file and put it in your root folder.
Code:

redirect 301 /old/old.html http://www.mysite.com/demo1/new.html
Quote:

Originally Posted by connectw (Post 23290)
I am just learning. I have installed several of the demo templates, each in it's own subfolder on my site, to avoid any conflicts in code while I learn.

Is it possible to have visitors to my site directed to one of the subfolders and make that that be the actual page that launches the site? or does joomla have to be loaded into the root of the site? I want to keep joomla in its own sub directory, I have wp in its own directoy and so on. For example- how can I make the demo3 be the place that visitors get to when they type in www.mysite.com?

/public_html/mysite.com/demo1
/public_html/mysite.com/demo2
/public_html/mysite.com/demo3


jaycburton 01-06-2010 10:33 AM

Quote:

Originally Posted by Ardoris (Post 23293)
Simplest and easiest way to do that is...

Create index.html for your domain.
Example:www.mysite.com/index.html

On index file, put following code.
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv=Refresh content="0;url=/demo1/"></head></html>

<!--
                                                                                                                                                                                                                                                                                                                                                                                                                                                                         
-->

Or you can do 301 redirect if you want it be permanent using .htaccess file.

Create blank file and name it .htaccess if you don't have one already.
Insert following code to .htaccess file and put it in your root folder.
Code:

redirect 301 /old/old.html http://www.mysite.com/demo1/new.html

Thanks for adding this. I normally think of 310 redirects when I want to redirect different domain names to one site, while retaining search engine rankings on those names. While certainly not hard to do 301 redirects, I usually consider it easier to manage redirects with my registrar, or on cPanel, depending on the circumstances. That is, of course, if there is no search engine traffic to be concerned with (like on my demo/testing sites). If there is, I would use the 301 method you mentioned. Cheers!

markwood321 08-18-2023 12:04 AM

Our mission is to provide a rich and engaging content hub that empowers individuals to unlock their full potential and live a fulfilling life. what is the best component speakers


All times are GMT -4. The time now is 03:12 PM.

Powered by vBulletin®
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.