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 for One Time Only

Redirect for One Time Only

Hi,

I purchased Chameleon and installed it on my 2.5 Joomla website.

What I want is, the user from Indonesia will be redirected to specific URL for one time only. The situation is like this:

First time a user opened www.abc.com, they will be redirected to www.123.com. And then, the second time they open www.abc.com, they WILL NOT be redirected to www.123.com.

How can I do that? I tried lots of rules and searching all over the forum but couldn't find any solution. Please help.

hafism
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: Redirect for One Time Only

Hi hafism,

You can do this by using the Permanent Cookie feature in Chameleon.

Rule 1: detect permanent cookie A (in the Quick Rules). In the Succeed Action, select "Stop Processing". This has the effect of bypassing the rest of the rules if permanent cookie A was found.

Rule 2: detect domain name www.abc.com. In the Succeed action, do 2 things: (i) set Permanent Cookie A, and (ii) do the redirection. I would also recommend that you do not set it to be a 301 redirect but instead a 307 (temporary redirect).

You may also wish to create another rule that you place BEFORE the other 2. In this one, detect "all bots/browsers" e.g. google bots using the dropdown provided for Browsers.  In the Succeed Action, select "stop processing". This will allow the google bot to index your main site even if other browsers are getting redirected.

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

Re: Redirect for One Time Only

Hi metamodguy,

Thanks for your reply. But, where exactly should I enable the GeoIP/GeoCity for Indonesia country? For this redirect, I just want people from Indonesia affected.

Thanks a lot.

hafism
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: Redirect for One Time Only

Oh, sorry, I didn't notice that you want this to be just for people from Indonesia.

It's just a small change. Here is the complete set of steps:

SETUP - in the Configuration screen of Chameleon, click on "Download latest GeoLite Country database"

Rule 1: detect permanent cookie A (in the Quick Rules). In the Succeed Action, select "Stop Processing". This has the effect of bypassing the rest of the rules if permanent cookie A was found.

Rule 2:
- in the Config section of the Chameleon rule, select "Enable GeoIP/GeoCity: GeoIP Country (free or commercial)"
- in the "Quick Rules" section of the Chameleon rule, enter ID into the "only these countries" box
- in the Environment section, detect domain name www.abc.com.
- In the Succeed action, do 2 things: (i) set Permanent Cookie A, and (ii) do the redirection. I would also recommend that you do not set it to be a 301 redirect but instead a 307 (temporary redirect).

If you are only redirecting people from Indonesia you probably don't need to worry about bots, as most will come from USA, especially googlebots.

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

Board Info

Board Stats:
 
Total Topics:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10091
Newest User:
lamanaudio
Members Online:
3
Guests Online:
108


Forum Legend:

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