[thelist] tracking a url [implementation?]

Tom Dell'Aringa pixelmech at yahoo.com
Tue Nov 4 15:38:14 CST 2003


--- Hassan Schroeder <hassan at webtuitive.com> wrote:
> Your choice. Using a mapping scheme, rather than the whole URL,
> may be preferable as it'll trap any bad URLs (typos) that have
> gotten introduced into your pages.
> 
> And letting the redirector pass an arbitrary URL unparsed gives
> me a queasy feeling, securitywise :-)

My thought too.

> > Either way I assume I would then dynamically write that to the
> > meta refresh tag with a value of 0 and let it fly..correct?
> 
> No, there's no reason to send the browser a page -- just send the
> redirect header with the target URL...

Not sure exactly what you mean - but here's what I decided on. I do a
url like so:

<a href="foo?url=dood">foo</a>

Then is my ASP page I have thus:

sURL = Request.QueryString("url")

Select Case sURL

	Case "dood"
	' in each case, write data to a tracking file, txt file etc...
        response.redirect "http://www.dood.com/" 

        Case etc. etc.
End Select

So if the URL is good, the page should immediately redirect if I
undersand response.redirect correctly.

Then in the body of the HTML I put the actual link, just in case a
bad URL gets passed somehow and none of the cases get evaluated, the
user can re-click on the same link and it will send them directly
off..

Comments?

Tom

=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: JavaScript Author / Every Friday!
http://www.thywordistruth.net/ :: Eternal Life

"I'll ho ho and ha ha you!" (Daffy Duck)


More information about the thelist mailing list