Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Different Home Page per sub-domain

Different Home Page per sub-domain

I operate a series of 20 sub-domains which are essentially to list my products targeting different countries on Google Merchant Center + AdWords

tld = www.4footyfans.com

US =  us.4footyfans.com
AU = au.4footyfans.com
NZ = nz.4footyfans.com
etc

My issue is different spellings in English variants and also different terms for the same thing.

e.g.

en-GB Football

en-US Soccer

So, I can create a separate home page article for each en variant but I wish to associate the article to the specific sub-domain.

Nearly all visitors will arrive via a Google link to a product so they will already land on the correct product page, with the associated currency parameter included in the url.

e.g.

https://us.4footyfans.com/store/liverpo … ncy_id=144

If the visitor then selects the Home button, I wish them to be directed to the correct article for the en-US variant linked to us.4footyfans.com

I could use the one article, as at present, which uses the term "football / soccer" as a coverall but I would prefer to create a tailored version for each English speaking country.

All  Virtuemart pages will remain as they are.

As  a person living with autism (high-functioning), I am able to follow specific instructions but am not so good at understanding general documentation.

I would appreciate direction on how to achieve my goal.

TIA

EsSa55
Beginner Modder
ranks
useravatar
Offline
4 Posts
User info in posts
Administrator has disabled public posting

Re: Different Home Page per sub-domain

Hi EsSa55,

thanks for getting in touch. I'll do my best to explain precisely and carefully.

Let me first tell you how you normally set up "different home page for different subdomain" with Chameleon.

There are 2 parts: the conditions, and the action.

You need to set up a separate Chameleon rule for each domain you want to detect. In that rule, the condition is "the domain name is us.4footyfans.com". You set this up in the Environment tab in the Chameleon rule by typing us.4footyfans.com into the domains box.
In the same rule, in the Actions tab, the left column in SUCCEED actions. These actions are triggered if/when the Condition is met. In the SUCCEED action there is a dropdown called "Site Default Menu Item". If you use this to pick a menu item, then this becomes the "home page" of http://us.4footyfans.com/ and the old homepage usually ends up as http://us.4footyfans.com/homepage or whatever alias you used in the menu item.

Therefore, as long as the user lands on a url on the us.4footyfans.com domain, the home page will be the one that you set in the Succeed Action in the rule.

Important note:
Setting the default page like this ONLY changes the page that gets displayed on the URL "/". It does not do anything with the menu item that was previously your home page. So let's say you had the following main menu:

Home = /
About Us = /about-us
Contact = /contact
NewHomepage = /UShomepage

When you change the default menu item in a Chameleon Succeed Action, the original menu item stays in place, but with a different URL. It now looks like this:

Home = /homepage  (and it shows the same page that it used to show on "/")
About Us = /about-us
Contact = /contact
NewHomepage = /

This is probably not what you want to happen! If they click on "Home" it goes to the wrong page.

There are several things you can do about this.

(1) Don't use a normal menu item for the Home menu item. Instead, make it a link to the URL "/".  Use a different menu to create the actual default menu item. That way, the main menu will always have a home link to "/", and if you don't change the default menu item then the default from that other menu will be used.

or (2) set up your main menu like this:

Home = /
Home = /UShomepage
Home = /GBhomepage
Home = /AUhomepage
Home = /NZhomepage
About Us = /about-us
Contact = /contact

(that's the first 5 menu items all named "Home").

Then in your Chameleon action for us.4footyfans.com you do 2 things:
a - set the default home page to the US menu item above (the 2nd one in the menu)
b - use the "Unpublish Menus" control in the same Succeed Action to hide all the other "home" menu items on the list, i.e. number 1, 3, 4 and 5.

That way, when someone lands on us.4footyfans.com they will see the following menu:

Home = /   (but shows the page that you had set up as "UShomepage")
About Us = /about-us
Contact = /contact

Now, to complete the picture you need to set up a Chameleon rule for each of the other domains. Each one will hide all the "other" Home menu items. Don't forget to make a rule for "www.4footyfans.com" that hides all the country-specific Home menu items.


SO back to your situation:
I think that this will actually do exactly what you need it to do. You will already be sending people to the correct domain via Google (according to what you wrote). Once they are on that domain, all of the links and menu items SHOULD be relative to that domain, therefore they will stay on that domain for the rest of their session.
You might want to make up a small menu to display in a module, or just some static HTML that lists the country-specific domains and lets people switch domains if they want to. The advantage of doing this as a menu is that you can use Chameleon to selectively switch any of the menu items off in certain circumstances.

I hope that makes sense
Best regards and good luck with your site
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Different Home Page per sub-domain

Thanks for your detailed instructions, Stephen.

I needed to immediately ignore the first section because, as you said, that it what NOT to do.

Moving to the section headed: "There are several things you can do about this. "

I understand Option #2 but not Option #1, which is fine.

My next question is:

Is it possible to test this on my dev site (back.4footyfans.com) because that is already a sub-domain and there is no such thing as:

us.back.4footyfans.com

etc.
?

I would not wish to set this up directly on my live site without first knowing it works.

TIA

Eddie

EsSa55
Beginner Modder
ranks
useravatar
Offline
4 Posts
User info in posts
Administrator has disabled public posting

Re: Different Home Page per sub-domain

Hi Eddie,

if you have back.4footyfans.com then does www.back.4footyfans.com also work? If it does, you can treat them as 2 different subdomains, and do some testing of redirects between those two.

Or, if you have cPanel, then you should be able to set up a Parked Domain with a different domain name but linked to back.4footyfans.com  You would also need to set up DNS so that www.back.4footyfans.com has the same IP address (or is a CNAME) for back.4footyfans.com.

Hope that helps
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Different Home Page per sub-domain

Hello Stephen

www.back.4footyfans.com does not work.

However, since back.4footyfans.com points to /public_html/back, *.4footyfans.com/back does work

i.e.
(www).4footyfans.com/back = back.4footyfans.com

Therefore, since au. nz. us. etc all point to /public_html,

us.4footyfans.com/back etc works.

That being the case........?

Best

Eddie

EsSa55
Beginner Modder
ranks
useravatar
Offline
4 Posts
User info in posts
Administrator has disabled public posting

Re: Different Home Page per sub-domain

Hi Eddie,

ok, that's an interesting observation. So you're saying that your test site can be accessed via all of the following:

us.4footyfans.com/back
au.4footyfans.com/back
nz.4footyfans.com/back
... and others.

So this is good! The only difference between this setup and your "live" setup is that all the file path part of the URLs starts with /back. You can test out your site on any of these URLs. If it's working properly right now (without any Chameleon set up) then I think you're good to go. Chameleon will be switching the domain between the different options, so the rest of the URL will just stay the same as you switch the domain.

I think you should be able to use my original instructions. The only difference will be the "/back" in all the URLs.

Hope that works!
Cheers
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: Different Home Page per sub-domain

Hello Stephen
Yes, that's exactly right re "sub-domain/back" loading the same as back.4footyfans.com..
Currently, there is no difference between them since Chameleon is not configured.
I shall be giving it a go next week and will report back.
Best
Eddie

EsSa55
Beginner Modder
ranks
useravatar
Offline
4 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1689
Total Polls:
6
Total Posts:
5941
Posts this week:
2
User Info:
 
Total Users:
5331
Newest User:
rory488487
Members Online:
2
Guests Online:
131


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked