--On Friday, May 26, 2000 10:58 AM -0400 Vijay <[EMAIL PROTECTED]> wrote:

> Hello,
>
> Thanks for the suggestion. However, I have a problem still left out.
>
> The redirection is loading the redirected page properly. But, it still
> shows the URL as the same from where it is redirected.
>
> As below:
>
> My form calls the script
> "/scripts/visitorinfo.cgi?pageid=delmail&lang=EN&adno=1".
>
> In visitorinfo,.cgi, I have following steps
>
>    print "Content-type: text/html\n";
>     print "$mycookie\n";
>     print "Location:
> /scripts/visitorinfo.cgi?pageid=mailhdr&amp;lang=EN\n\n";
>     exit 0;
>
> It really goes to the page mailhdr with appropriate details. But the
> address in the browser is still
> "/scripts/visitorinfo.cgi?pageid=delmail&lang=EN&adno=1".
>
> This gives a problem. If the user reloads the page, it will again try to
> do what I am doing in this, which I don't want to happen.
>
> How do I make the address (URL) to change according to the page it is
> showing.
>

The one thing I see missing is that status code in the HTTP status header 
(the first header the server send:

HTTP/1.1 301 MOVED PERMANENTLY

or

HTTP/1.1 302 MOVED TEMPORARILY

Are you using CGI.pm?  If not, you should.  It makes life easier.  You can 
simply set the status header.  If you are doing it without the benefit of 
CGI.pm, I've not tried it, but I think if you just make that the first you 
print, the server will leave it alone and not affix it's own.  But I've 
never tried it.

BTW: something that might be helpful for you is to telnet to the server and 
so look at the entire response.  Do the following:

telnet <your host> 80

And then:

GET /file HTTP/1.0
<blank line>

Don't forget to hit enter twice on the GET header.  By telling the server 
you speak HTTP/1.0, it will send the full set of headers for you to look at.

-- Rob

       _ _ _ _           _    _ _ _ _ _
      /\_\_\_\_\        /\_\ /\_\_\_\_\_\
     /\/_/_/_/_/       /\/_/ \/_/_/_/_/_/  QUIDQUID LATINE DICTUM SIT,
    /\/_/__\/_/ __    /\/_/    /\/_/          PROFUNDUM VIDITUR
   /\/_/_/_/_/ /\_\  /\/_/    /\/_/
  /\/_/ \/_/  /\/_/_/\/_/    /\/_/         (Whatever is said in Latin
  \/_/  \/_/  \/_/_/_/_/     \/_/              appears profound)

  Rob Tanner
  McMinnville, Oregon
  [EMAIL PROTECTED]

Reply via email to