View previous topic :: View next topic |
Author |
Message |
Toc_vremenno -
Joined: 09 Apr 2004 Posts: 3
|
Posted: Fri Apr 09, 2004 8:20 pm Post subject: Location redirect - address bar of the browser |
|
|
Win98, IE5, Abbys X1 1.1, C++. My form uses CGI to sent data to the server. At the end of cgi code I use: printf("Location: / \r\n\r\n"); Redirection works, the start page "/" loads, but the address bar is still "http://myServer/cgi-bin/myScript.exe"! Why isn't it "http://myServer/" as I have redirected? Browser issue or server? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Apr 11, 2004 11:44 pm Post subject: Re: Location redirect - address bar of the browser |
|
|
Toc_vremenno,
When you redirect the page to a relative URL, the server will perform an internal redirection and that's why your browser won't notice it. This behavior saves bandwidth and makes things faster (and is very convenient in many situations).
To force a "browser redirection", you must use a full URL as in:
Code: | Location: http://mysite/ |
_________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|