Greetings to all! I have a script (let me call it script1.cgi) that does something, and at the end of it, it generates an output html that has a javascript that is executed upon loading "location.href=http://www.something.com/script2.cgi". Basically what the html accomplishes is a sort of re-direction to the script "script2.cgi".

The second script "script.cgi" would only do something if the referrer is from http://www.something.com/script1.cgi, else it would return an error. This is why I used $ENV{HTTP_REFERER} in my script2.cgi.

The problem is that when I tested this with a Linux platform (Mozilla, Netscape, Galeon), the referrer is recognized, but when I accessed it using a Windows platform (IE5.5 and higher), the referrer environment variable is simply blank,... therefore my script2.cgi would return an error.

Why is this so? What would be a better way to call another script or a re-direction? Example, at the end of "script1.cgi" I would want to run and execute "script2.cgi". Would it solve the issue?


In reply to $ENV{HTTP_REFERER} Problem on a Windows Client by soon_j

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.