[thelist] cgi redirect greivances

Robert O'Rourke rob at sanchothefat.com
Thu Jan 17 16:04:55 CST 2008


I have some old old code from a site ('siteA') that provides 3d product 
samples for products on our websites. The problem is they will only 
accept one referrer (???) so we have to bounce all requests from 'siteX' 
via 'siteB'.

So, a user clicks 'view sample' on siteX which submits some stuff to 
siteB which then redirects to siteA. The code creates a query string to 
append to the url of siteA like so:

print $q->redirect(-Status=>301, 

I changed it to this because I thought server redirects were better than 
it going off to a javascript redirect or meta refresh. Now I thought 
that because this request went to siteB first that siteB would become 
the referer, job done. But no...

I tried adding a third parameter to $q->redirect(); like so:

print $q->redirect(-Status=>301, 

but it doesn't seem to set the referrer.

I admit I've never written any cgi before this...

Any takers?


More information about the thelist mailing list