English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?
Go to bottomPage: 1
TOPIC: Redirect main site to a child site
#14340
Redirect main site to a child site 1 Year, 6 Months ago Karma: 0
Hi,

I would like to redirect my main site www.mysite.com to one of my child site : www.mysite.com/mysubsite1

How can I do that ? I didn't find in documentation or in forum.

Thank you !
pascal-ld
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#14341
Re: Redirect main site to a child site 1 Year, 6 Months ago Karma: 53
If the main site means for you the "master" website, the solution that I see is in the .htaccess where you should write an additional rule to redirect the website URL.

I think that you should write something like:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.mysite.com/mysubsite1$
RewriteRule (.*) www.mysite.com/mysubsite1/$1 [R=301,L]
</IfModule>

I didn't tested. This is just to help you get inspired of something.
Becarefull that when you do that, you will loose the access to your master.
To access your master, you will have to use another domain (or subdomain) that is not defined in any slave site.


Now if the "main" site is also a slave site then in JMS, you can update the site definition in which you add the "main" site URL into the "subsite1" definition.
In "subsite1" definition, you can also select "redirect to the first domain".

So if in the "subsite1" definition you have:

www.mysite.com/mysubsite1
www.mysite.com

Select to the first one, will redirect www.mysite.com to the "first" www.mysite.com/mysubsite1
edwin2win
Moderator
Posts: 5367
graph
User Offline Click here to see the profile of this user
Last Edit: 2018/09/30 08:44 By edwin2win.
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla