ComputersProgramming

HTML redirect: flow control of visitors

) с одного адреса на другой имеет значение, прежде всего, с точки оптимизации адресной строки браузера. The redirection mechanism ( html redirect ) from one address to another has a value, first of all, from the point of optimization of the address bar of the browser. Depending on the competence of the site developer, anything can be written in it, while it is enough to have just the name of the site there.

Going to the site, the visitor can write in the address bar: URL: //index.html, URL: //index.htm, URL: //index.php, URL: //index.phpp ... A simple mechanism of server rules makes "Redirect with html on without html", that is, it provides an opportunity to remove unwanted tails (.htm, .html, .php ...) in the address bar, and not only them:

  • RewriteEngine On.
  • RewriteBase /.
  • RewriteRule (. *) \. (Html | htm | php | phpp) $ $ 1 [R = 301, L].

Recorded in the .htaccess file in the root of the site will lead to the address bar:

URL: // index

The meaning of redirection

By and large, the browser is a banal output to the IP address space. Thanks to numerous DNS, DHCP and other mechanisms, all this space is projected onto specific, accessible to the perception of a simple visitor's domain names. However, by no means in all cases it makes sense to show in the address bar what is actually there. Make redirection html - a good solution. In non-exclusive cases or for technical reasons, for example, when working with phpMyAdmin or when debugging a site, you can admit something that is not perceived in the address bar, as in the picture below.

But in practice, it's better not to load the visitor's perception with unnecessary information. The visitor came to the site for goods, services, information, and he is least interested in the contents of the address bar of the browser.

However, from the point of view of the site's perception, the developer should correctly display the address of the site in the address bar, namely the active page and exactly as it is best remembered by the visitor.

Technical need

Assuming that the server at the entry point to the site works flawlessly, then you can start planning the redirection from it. A rare site is created once to exist forever, periodically it is necessary to repair individual pages or the entire resource.

If earlier it was possible to write that the site is technical work, and not to do HTML redirection, then today it is perceived as a disrespect to the owner of the site to their customers. The phrase "We apologize for the inconvenience!" Only aggravates the situation.

The usual practice of redirection

Not all developers, or not always have the opportunity to perform work on the reconstruction or completion of sites on their own servers. Often, the work is performed on an active resource.

Redirecting the html page is the simplest and most effective solution.

META HTTP-EQUIV=Refresh и нужный CONTENT=" ... ", можно перенаправить запросы, пришедшие на доменное имя, на нужный адрес в Сети. Specifying in the META tag HTTP-EQUIV = Refresh and the required CONTENT = "...", you can redirect requests that came to the domain name to the desired address on the Web.

Redirect is an important part of the site

Technologies have become perfect, and the center of competition has shifted towards service: the quality of services, goods, information, etc. has become an essential element in the decision-making process. Speed and efficiency of work with the flow of customers also came to the fore.

If yesterday the word site meant one IP address or one domain name, today a rare site in its work does not use html redirect through other pages, through other sites. These can be pages of authorization, the collection of statistical data, the form of information transfer.

The modern site is far from always the same - one domain name and one IP-address. A site is often called a web resource, and it is understood that many parts of the site are distributed according to real geographic positions or are configured from a technical point of view for distributed information processing.

Html redirect allows visitors from Russia to send to the server in Moscow, and visitors from America to the server in Washington. Although the speed of communication lines is rarely dependent on distances, but this scheme allows the Russian part of the site to target Russian-speaking visitors and offer addresses for the provision of services, purchase of goods in the immediate vicinity of the visitor's IP address, and Americans - to offer everything in English and within their Accessibility.

An important part of any web resource is the technical side: reliability, stability, security. Html redirect allows you to instantly switch the server. All visitors that came before the redirection, still continue to be serviced on the main server, but the following are already going to another, ancillary. As soon as the first will satisfy the interest of the last visitor, he becomes prophylactic.

The reverse Html redirect releases the secondary server, and the main server again starts its duties. Such switching allows you to carry out full-fledged preventive work, invisible to visitors.

Simple redirection of the html page - and how many possibilities.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.