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.

 

Referrer rule not working

Referrer rule not working

I may be going down the wrong road here but what I'm trying to do is to track specific url's ( with template switching) for analytics and marketing.

Having said that I'm not having much success in getting a referral url to work and have it switch the template. I have sh404sef installed and have checked that plugin order is correct. The referral rule is set to "contains" and the url is just the domain with a number added to the end ie. www.domain.com/25. This of course is a not existent page but just something to trigger the template change.

When I test it with debug on it comes up with the sh404sef 404 page and the debug  shows it failing with the same url that the 404 error is showing.

There may be a better way to do this so I'm open to suggestions.

Thanks for any help.

Mobilepro
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Referrer rule not working

Hi Mobilepro,

If you want to use Chameleon to detect entry pages, then it should be obvious that the URL that you use has to be able to map to a real page on your site. If that url/page does not exist, you're going to get a 404 error as you are doing.

You have these choices:

1 - make the extra part of the URL into part of the query string rather than part of the URL that maps to a separate page. e.g. www.domain.com?25 instead of www.domain.com/25  In this way it will still map to the front page and you won't get a 404.

2 - Instead of that, you could keep the URL you have at the moment, but force a redirect as part of the SUCCEED action. i.e. redirect back to the front page.

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: Referrer rule not working

Thanks for the response...sorry I probably didn't explain it very well. I'm not so concerned about the 404 error as it's easy enough to do a redirect but the issue was that it won't make the template switch.

Using the Page Url does the template switch correctly but I was trying to see how I can do it using the referral .

After I did the original post I happened to see the video on "switching templates according to the entry URL". That looks like what I need to do.

Mobilepro
Beginner Modder
ranks
useravatar
Offline
3 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:
4386
Newest User:
verlywl7
Members Online:
1
Guests Online:
716

Online: 
verlywl7

Forum Legend:

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