Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Redirect for One Time Only
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.
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
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
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Redirect for One Time Only
Board Info
- Board Stats:
- Total Topics:
- 1700
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 8052
- Newest User:
- maarie443
- Members Online:
- 0
- Guests Online:
- 307
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked