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.

 

Manually change the website without being redirected by IP redirection

Manually change the website without being redirected by IP redirection

Hello,
I have setup a IP redirection for the UK. So anyone within the Uk automatically redirects to the UK website. But is it possible to override this redirection.

For example we have a landing page with UK, France and International zones. I want to beable to click a flag in the corner of the site which links back to the landing page without being automatically redirected to the UK site for having a UK IP address.

Is there somehow a way to stop people being redirected as soon as the flag is clicked? What do I need to do in Chameleon to add this exception?

kazzac
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Manually change the website without being redirected by IP redirection

Hi - I see that you replied in another thread. Do you still need any assistance on this?

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: Manually change the website without being redirected by IP redirection

The IP redirection works great this is a different problem I am having?
I need to still access the other language sites but also from a UK IP but obviously it redirects me.

As explained above I would like to click somewhere on the site which enables me to be exempt from the redirection. Like clicking a flag which takes me to a page  where I cam select whatever language site I want without being redirected back to the UK.

Is there away to possibly exempt a user from being redirected back to the UK when they click somehere on the website?

Thanks

kazzac
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Manually change the website without being redirected by IP redirection

Hi,
yes you can do this. The easiest way to set up an exemption is to use the Cookie or Session Variable features.

(1) There are 4 cookies (A-D) and 4 session variables (A-D) built in.
(2) The difference between cookies and session variables is that cookies will last on the browser for up to 10 years, while the session variables last until the browser window is closed.
(3) You can set any one of these cookies or session variables (or remove it) in an Action in a Chameleon rule.
(4) You can detect whether a cookie or session variable has been set, in the Quick Rules part of a Chameleon rule.

So here's how you would set it up:
1 - make a rule that detects your triggering condition (e.g. detects someone on the specified landing page). In the Action, "Set cookie A".
2 - make a rule that detects cookie A, and in the Action, "Stop Processing", so that the following rules are not run.
3 - then add any of the rules for doing redirections based on country/language etc.

The order of those rules matters - obviously rule 1 and 2 need to come before any of the redirection rules that you are trying to avoid for certain users.

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

Re: Manually change the website without being redirected by IP redirection

Hello I believe I have kind of got it working. It redirects you to the UK site when trying to visit any URL and when you click on the flag it links you to a landing page which then stops the redirect.

The issue I seem to be having now is that if I click on any of the buttons which link through to the International, French and Irish version of the site it just redirects be back to the UK again.

I have listed my current settings below.

At the moment I have set it so:
RULE1:
1. 'Menu Handling' tab, selected the page 'Landing' ( this is the one I don't want the redirection to work on)
3. 'Actions' tab, Set Permanent Cookie A
4. Succeed Action  'Process Next rule in chain'
4. Fail Action  'Process Next rule in chain'

RULE2:
1. 'Quick Rules' tab, Set Cookie/Session variable to 'Permanent cookie A'
1. 'Menu Handling' tab, selected the page 'Landing' ( this is the one I don't want the redirection to work on)
3. 'Actions' tab, set Succeed Action to  'Stop Processing'
4. Fail Action to  'Process Next rule in chain'

This are the settings I am using I have tried adding the homepage of the international site to these rules but for some reason it then stops the UK redirection working.

Thanks

kazzac
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: Manually change the website without being redirected by IP redirection

Hi Kazzac,

It's a bit of a logic problem in your setup.

As I suggested in my original reply, you need to have (at least) 3 rules.
Rule 1: detects the trigger condition (someone on the landing page from the redirect), and sets the session variable
Rule 2: detects the session variable, and quits the rule chain if found.
Rule 3: detects the GeoIP country and redirects it to the landing page (as detected in rule 1).

So your rule 1 appears to be ok.
Your rule 2 mixes up my rules 2-3.
In yours, you were only letting the session variable bypass the further rule (the redirections?) when on the landing page. In fact you need to use the session variable to bypass the further rule for ANY page request. That's why when someone clicked on the other flags, they were still being 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
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Total Posts Today:
2
User Info:
 
Total Users:
4366
Newest User:
chicagosepticpumping
Members Online:
2
Guests Online:
167


Forum Legend:

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