URL redirection
From Free net encyclopedia
URL redirection is a technique on the world wide web for making a web page available under many URLs.
URL redirection may be used to redirect a URL to a page on the same web server, for example http://www.company.example/ may be the same as http://www.company.example/index.html.
Or it may be used to redirect a URL to a web page on another web server. This is typically used when virtual hosting is not available for some reason. For example, a customer of a web hosting company has a page at the URL http://www.somedomain.com/~user/mybiz/ but wants to make that page available at the URL http://www.anotherdomain.com/. If the web hosting company does not offer virtual hosting, another company can provide a URL redirection service. (URL redirection is often called domain forwarding when used like this, but that term is misleading because the domain is not aliased in the Domain Name System; only the web pages at URLs using the domain are forwarded.)
Contents |
HTTP redirects
In the HTTP computer protocol used by the World Wide Web, a redirect is a response with a status code beginning with 3 that induces a browser to go to another location.
Meta refresh
To create a web page that causes the user's browser to be redirected to another page, a web programmer can use the HTML Meta refresh tag inside the <head> tag.
Scripting redirects
The HTTP protocol requires that the redirect be sent all by itself, without any web page data. As a result, the web programmer who is using a scripting language to redirect the user's browser to another page must ensure that the redirect is the first or only part of the response. In the popular ASP scripting language, this can also be accomplished using the methods response.buffer=true and response.redirect "http://www.newpage.com". Using PHP, the popular open source language, one can use header("Location: http://www.newpage.com");.
Wikipedia redirects
Wikipedia contains pages whose sole purpose is to redirect the user's browser to a different page. They exist to allow users to enter alternate spellings or names for articles, and redirect them promptly to the article they were most likely looking for. Help with this feature is found by clicking the redirect link.
URL redirection services
URL redirection services exist to shorten long URLs.
Some web publishers have criticized the use of these services, arguing that replacing an URL with an encoded shortcut effectively erases information from a document. However, when a proper HTTP Header is used such as a 302 redirect, then no harm is done.
URL obfuscation services
There exist redirection services for hiding the referer using META refresh.