Return to Index  

You missed the best, fastest, and most correct ways...

July 18 2000 at 6:14 PM
 
from IP address 4.35.184.27


Response to comme ci...

 
1) Return a Location: and URI: HTTP header containing where you want to redirect to (both should be the same.) This is like your meta tag above except is more server side. Meta http-equiv was intended to allow storing of HTTP headers in the HTML.

2) Return a Refresh:url=http://foobar.com/;1 header. URL attribute doesn't exist of META tag.

3) Perhaps the best way. Return a 301 Moved Permanently status code, followed by a URI: (and Location:, just to be safe) header saying where to redirect. Advanced browsers which do not exist yet will update the link to the new location, if a file is writable. Alternatively, 302 Found can be used instead.

See http://www.w3.org/Protocols/HTTP/HTRESP.html for more HTTP status codes.

Method #3 works better because the Back button is not broken. If you press back, you will not go to the page you where redirected from.

Of course, you need to be able to return HTTP headers to do these, but F2S gives PHP and CGI capabilities.

-shellreef

 
 Respond to this message   
Responses

Create your own forum at Network54
 Copyright © 1999-2010 Network54. All rights reserved.   Terms of Use   Privacy Statement