Redirect with no referer...

E

Erik Rull

Hi,

I wrote a webmailer and want to "derefer" links that are clicked within
mails, so that no session or any other param are in the referer-field of
the target server.

I had this attempt:

#!/usr/bin/perl

print "Refresh:1;URL=http://www.server.to/click.on\n\n";

But the referer is only killed in some browsers, some versions of the
MSIE still take the referer with.
Bug or feature? ;-)

Any other ideas?

Greets,

Erik
 
T

Tad McClellan

Erik Rull said:
I wrote a webmailer and want to "derefer" links that are clicked within
mails, so that no session or any other param are in the referer-field of
the target server.

I had this attempt:

#!/usr/bin/perl

print "Refresh:1;URL=http://www.server.to/click.on\n\n";


If you are having trouble with Perl's print() function then
you have a Perl question.

Are you having trouble with Perl's print() function?

But the referer is only killed in some browsers, some versions of the
MSIE still take the referer with.
Bug or feature? ;-)

Any other ideas?


Ask Perl questions in a Perl newsgroup.

Ask web questions (like yours) in a web newsgroup.
 
M

Malcolm Dew-Jones

Erik Rull ([email protected]) wrote:
: Hi,

: I wrote a webmailer and want to "derefer" links that are clicked within
: mails, so that no session or any other param are in the referer-field of
: the target server.

: I had this attempt:

: #!/usr/bin/perl

: print "Refresh:1;URL=http://www.server.to/click.on\n\n";

: But the referer is only killed in some browsers, some versions of the
: MSIE still take the referer with.
: Bug or feature? ;-)

: Any other ideas?

You can't control the refer header cause it's sent by the browser.

Instead you could use LWP:Simple to act as a proxy. You send exactly the
headers you want the remote site to see.

Then your script receives the results and sends them back to the browser.

Hopefully the html from the remote site has embedded links that point back
to their own site so that the browser sends subsequent requests to that
site, and not back to your script. I guess you could parse the html
before you send it back to ensure there is a base statement to the remote
site to help make relative links work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top