iirf + sessions variables

Topics: User Forum
Jul 27, 2009 at 10:08 AM

HI All

i have a slight dilemma which i'm hoping some could help me with. the problem is.

we have our own custom built trcaking system for our affiliate program, where webmasters sign up, get creatives post on their websites and ultimately send traffic to us. and here in lies the problem:

when an affiliate of ours grabs the tracking code it will append his/hers unique tracking ID to the designated landing page so that when that affiliates traffic lands on the page can track how many hits / downlaods etc that affiliate is sending us. the tracking code looks like so:

www.example.com/index.asp?btag=AffId123456

my question is simply this. is it possible to re-write the incoming URL to just index.asp BUT keep the session variable?

any light that can be shed on the problem is most appreciated

Jul 27, 2009 at 3:39 PM

Why don't you just store it as a Session variable on landing, then ignore it? I don't think that there is a case for a rewrite here.

If you want to remove the querystring, then why not just check for it, if it exists then write it to a Session variable, then forward the page to index.asp without the querystring.

This could all be accomplished in the asp page itself before anything is output.

Hope this helps.

Coordinator
Jul 27, 2009 at 4:05 PM

Yep, the forward-to-self ASP page could do this pretty simply as described by shonk.

But I am not at all sure this is what you want.  The result is, the external URL is the ugly one with the querystring.  The one your page operates on is the "clean" URL.  That is the reverse of what people usually want.

I think I understand what is happening today in your system with the affiliate identifier.  But I don't understand what you want to get to.

If I had to guess I would say, you want to tell your affiliates:  send your request to index.asp, and be sure to include the Cookie, (or other request header) indicating the request ID.   Then on the sevrer side you want to convert from the server variable to the "ugly" page, which looks like index.asp?btag=3636363389 .   You could do THAT with a rewriter like IIRF.

 

 

Jul 27, 2009 at 5:07 PM
Edited Jul 27, 2009 at 5:47 PM

HI guys

thanks for the advice so far. the reason i need it rewritten is because is simply due to Search Bots. i want to get rid of the supplemental search results that the company i work fors sites are experiencing.

essentially what is happening is like so:

  • bot follows affs link with there ID in the url.
  • bot lands and sees the page as a different page (because of UniqID)

essentially what i want is the canon version of a page with the server aff tracking code intact, but i need to use the rewrites so that next time the SE's re-index the site it will see index.asp as one page with 10 000 inbound links as a opposed to 10 000 pages with 1 link to them

i've tried everything from trying to exclude the page being indexed via robots.txt to teh new canonical search directive, yes i'm an evil SEO :P, i simply can't shake this problem, so i really do appreciate any insight you can give.

@Shonk do you mean something like this: http://metadeveloper.blogspot.com/2006/05/redirect-to-self-aspnet.html?

i think the forwarding to self might be the problem solver. can the forward to self be done with 301?

Jul 27, 2009 at 6:23 PM
Edited Jul 27, 2009 at 6:24 PM

I was thinking simply along the lines of checking against the querystring, then if it exists, create the Session variable, then use a Response.Redirect("/index.asp") to remove it from the querystring (assuming you're using ASP classic, which the .asp above would suggest).

I'm not sure how this works from a bot point of view. I've got a feeling that because the page is redirected before any output is sent, then it should be picked up as the page being redirected to and not as the page with the uniqID.

Let us know how you get on.

Cheers.

Aug 5, 2009 at 11:27 AM

hi guys just wanted to give you some feedback!

managed to sort it out and the self forwarding worked like charm! thank you so much for the advice!