• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Custom 404 for 1 folder

Contributor ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

I have a customer who wants to track clicks on certain links in his own way. Basically he wants to mask where the link is really sending a person by going to his "special" folder on his site, counting the click, and then sending them on to the real site. It is affliate marketing and he is paranoid that people will bypass him if he doesn't mask the link to make it look like a normal link and not an affiliate link.

So he wants a link like http://www.hissite.com/dummyfolder/widgets.cfm but there is no widgets.cfm file. He wants it caught, parsed for the widgets, incident recorded in db, and then passed onto the affiliate site.

What I was thinking was have an application.cfc (or cfm) template that does everything since it is supposed to be executed before any other template but then I realized that there has to be a page in there or it doesn't process. Soooooo I'm looking at how to capture a 404 JUST in that folder and put everything in that template.

Any other ideas on how to do this?
TOPICS
Advanced techniques

Views

296

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied


how about making an actual widgets.cfm page that does all that?

--
Azadi Saryev
Sabai-dee.com
Vientiane, Laos
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

Okay. This is affiliate marketing. So he doesn't want to have to build a new page for each product he sells. Instead he wants the site to figure out what affiliate product was clicked on and then record it and redirect it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 01, 2007 May 01, 2007

Copy link to clipboard

Copied

well, you could just pass a productid to the widgets.cfm page, run a
query there to get product data if you need to (i.e. to get a link to
the actual url), run another query to record a click on the link on
previous page, then cflocate the user to actual product url...
--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

We use something like this setup:

Your Link:
http://www.hissite.com/redirect.cfm?product=5&loc=[url encoded URL]

You could use javascript:widow.status='some link text' to mask the link destination in the status bar

redirect.cfm:
---------------------------
1) Log link click
2) forward on to URL

You may want to consider adding some sort of token to make sure no one else uses the script as an open HTTP relay. You could use Encrypt() to base64 / HEX encrypt the data to make it really secure.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

I don't think I'm making myself clear. He wants NO question marks in the URL.

The one he pointed me to was tinyurl.com I'm not sure how they do this but your link will look like this http://www.tinyurl.com/something

This then does a redirect to the proper site. So the only thing I can figure is it has a custom 404 page that catches it, reads the "something" part of it, and then sends the request on.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 02, 2007 May 02, 2007

Copy link to clipboard

Copied

LATEST
Would he be okay using Search Engine Safe URL's (SES's)?

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=2addd247

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation