Did they come thru the Re-director ? - How can I check if user came via a certain redirector ?
Hi all, hope you can help !
This is very hard to explain, so please bear with me (in this long post)...
I'm setting up a webpage, but don't have a domain name. I'm advertising the site's URL as one of the redirector services (ie: via come.to or cjb.net).
The re-direction services are set up to load my page into a FRAMESET (rows=100%,0) - so that the URL and TITLE shown on user's browser are the ones I want them to use (and bookmarks work, etc).
Since the site may move around, I want to ensure user always comes via a redirector, and not from a bookmark or link to the "real" URL.
I wrote a script that captures 'document.referrer' and compares it to an array of "good URL's" - also it checks for a blank referrer (ie: opening from a bookmark) and return an alert if they didn't come from where I stated.
Great - it seemed to work (at first).
After the redirect, in IE the 'document.referrer=' returns the redirect URL. Good, just what I needed.
BUT, in NS the 'referrer=' is blank if the page was loaded via the re-director URL !
OK, I then thought I would just send them thru a "gateway" page with a META-REFRESH or a JavaScript onLoad re-direction. Then I tried capturing *that* page's URL in my script as the 'referrer'.
BUT, in IE the 'referrer=' is blank if I do my *own* re-direction, yet in NS it returns the correct info (the exact reverse of what happened before).
This is something to do with variations between JScript and JavaScript... it's making me angry !
Also, it means that any tracking utilities (counters, etc) will not return the 'referrer' if NS is used.
All I want is to check the URL or some other property that I can use to identify whether they came thru my specified re-director pages.
My only thought at the moment is to check on the 'navigator' and have 2 completely different scripts based on the browser type - but that is a very messy way around it, and is not "future-proof" )
GRRR ! Anyone got any ideas - there has to be an easy way !
Thanks,
----------
John Cooper
fairhousing posted this at 17:35 — 22nd July 1999.
They have: 1,587 posts
Joined: Mar 1999
don't know if this will help but you can get a cgi script to do just about anything. if you have cgi capabilites check out www.cgi-resources.com
good luck
----------
Isn't it time you started making money with your site!
http://www.birminghamnet.com/cgi-bin/links/pages/WebmasterResources/MakingMoney
Traffic-Website.com free traffic, affiliate programs, hosting, & domain names.
My Site got hacked, but i'm coming back?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.