Location redirect - address bar of the browser

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
Toc_vremenno
-


Joined: 09 Apr 2004
Posts: 3

PostPosted: Fri Apr 09, 2004 8:20 pm    Post subject: Location redirect - address bar of the browser Reply with quote

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 View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Apr 11, 2004 11:44 pm    Post subject: Re: Location redirect - address bar of the browser Reply with quote

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 View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group