HTTP location Information & HTTP location Links at HealthHaven.com
advertise
add site
services
publishers
database
health videos
Bookmark and Share

search wiki for    ?
web dir firms image gallery news pdf wiki shop video 
about
toolbar
stats
live show
health store
more stuff
JOIN/LOGIN
Featured Results:
to Filesystem Location s - Apache HTTP Server
to Filesystem Locations - Apache HTTP Server
womansportstraining.com
  http ://www.atlasspinalcare.com - http ://www.atlasspinalcare.com
http://www.atlasspinalcare.com - http://www.atlasspinalcare.com
atlasspinalcare.com
 
HTTP
Persistence · Compression · HTTP Secure
Headers
ETag · Cookie · Referrer · Location
Status codes
301 Moved permanently
302 Found
303 See Other
403 Forbidden
404 Not Found

The HTTP Location header is used to force a web browser to load a different web page. It is passed as part of the Server Response by a web server when the requested URL has:

  • Moved temporarily
  • Moved permanently, or
  • A new resource has been created

The HTTP Location header should be sent with a HTTP Response Code of 3xx.

While the internet standard RFC 1945 (HTTP 1.0) requires a complete absolute URI for redirection[1][2], the most popular web browsers support the passing of a Relative URL as the value for a Location: header.[citation needed]

Contents

[edit] Example

The internet standard requires an absoluteURI token to follow a Location: header, which means it must contain a scheme[3] (e.g., http:, https:, telnet:, mailto:)[4] and conforms to scheme-specific syntax and semantics. For example, the HTTP scheme-specific syntax and semantics for HTTP URLs requires a "host" (web server address) and "absolute path", with optional components of "port" and "query". In the case that there is no absolute path present, it must be given as "/" when used as a Request-URI for a resource.[5]

Client request:

 GET /index.html HTTP/1.1 Host: www.example.com 

Server response:

 HTTP/1.1 302 Found Location: http://www.wikipedia.org/index.php 

[edit] Relative URL Example

This example, while incorrect based on the internet standard[6], works in all popular browsers.[citation needed]

Client request:

 GET /blog HTTP/1.1 Host: www.example.com 

Server response:

 HTTP/1.1 302 Found Location: /blog/ 

[edit] Notes

Not to be confused with JavaScript location variable.

[edit] References

  1. ^ RFC 2616 (HTTP 1.1)
  2. ^ RFC 1945 (HTTP 1.0)
  3. ^ http://www.rfc-editor.org/rfc/rfc3305.txt
  4. ^ http://www.iana.org/assignments/uri-schemes.html
  5. ^ http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.2.2
  6. ^ http://tools.ietf.org/html/rfc2616#section-14.30

[edit] See also




Product Results (view all...)

search wiki for    ?
web dir firms image gallery news pdf wiki shop video 



↑ top of page ↑about thumbshots