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.

 

Redirect to url according to language

Redirect to url according to language

Hi!

I've got one multi-language-website running and three domains directing to it:
example.org
beispiel.org
exemple.org

Now I want all urls beginning with example.org/de to be redirectet to beispiel.org/de, all urls beginning with example.org/fr to exemple.org/fr, etc. etc.

I don't need any rules depending on the browser language.

For every language I created a different template (based on Helix by Joomshaper).

Somehow I can't setup the correct rules. Can you direct me to the proper instructions?

Thanx

jpberry
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Redirect to url according to language

Hi,
happy to help.

Here's how I would do it:

Rule 1: use the Environment tab to set Page URL "Contains" example.org/de
In the Succeed Action (Actions tab), you can use an intelligent redirect that will simply switch the domain but leave the rest of the URL intact. So set "Next Action" to "Redirect", then use the following in the "Redirect URL..." box:

{scheme://}beispiel.org{:port}{path}{?query}{#fragment}

So that uses the same scheme, port (if used), path, query string and fragment from the original URL, just sends it to a different host.

Rule 2: do similar to rule 1. Detect the Page URL containing example.org/fr and set the redirect to:

{scheme://}exemple.org{:port}{path}{?query}{#fragment}

... continue that for as many languages as you have.

Then the next set of rules will set the template for each of the other sites.

Rule 10: in the Environment tab, in the Domain name(s) box, enter:
beispiel.org, www.beispiel.org

(if there are other domains that use the same template, include them in the list with their www version listed too, if necessary)

Then in the Succeed Action, use the "Set TemplateStyle" dropdown to select the template you want to use for that set of domains.

Save the rule and make a new one like that for each of the different domain/template combinations.

Test!

I trust that's all clear enough - but let me know if you need any further assistance.

Best regards
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
3328 Posts
User info in posts
Administrator has disabled public posting

Re: Redirect to url according to language

You've made my day!
Thanks.

jpberry
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Redirect to url according to language

smile

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
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4412
Newest User:
doyal54741
Members Online:
1
Guests Online:
178

Online: 
doyal54741

Forum Legend:

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