Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



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


too many redirects

too many redirects

I have set up a rule which seems to be working correctly to redirect UK ip address to a UK version of our website. The only issues I get now is an error saying 'too many redirects'.
I assume this is to do with the rule repeatedly sending the request to redirect. How do I make the rule only redirect once and then stop?
Thanks Karen

Beginner Modder
5 Posts
Administrator has disabled public posting

Re: too many redirects

Hi Karen,

you've correctly diagnosed the issue smile
There are several ways you could address this.

1 - set up the rule so that only pages that are NOT in the UK version of the web site can make the redirect rule succeed. One way to do this would be to use the Menu selectors to ensure the rule only applies on certain non-UK pages, OR perhaps on "all menu items except the specific UK ones".

2 - in some cases, it may be appropriate to only redirect users once (per session, or maybe forever). After that, if they want to return to the page they landed on originally, you might want to let them do that.
To set this up, when you do the redirect for the first time, you ALSO set a cookie or session variable. You can do this in the Succeed Action (set session cookie A, or set session variable A, etc).
Then make a new rule and place this rule just BEFORE the one that does the redirect.
In this new rule, detect the session variable or cookie (depending on which one you decided to use), which is found in the Quick Rules tab. Then in the Succeed Action for this rule "Stop Processing".

In this way, if they have already been redirected once, then the next time they go to a page, Chameleon doesn't get to the rule that does the redirect, so it won't do it again until the session expires or cookie is removed. (or on a new browser).

Hope that makes sense

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

3330 Posts
User info in posts
Administrator has disabled public posting

Re: too many redirects

Thanks for this it has helped me alot.
The only thing I am not sure is working are the cookies you were talking about. The redirect doesn't seem to work when I implement them so I have just disabled them and only used the IP redirection.


Beginner Modder
5 Posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Total Posts Today:
User Info:
Total Users:
Newest User:
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky