How to make readdressing from the website on the website

How to make readdressing from the website on the website

The domain - website soul. Successfully picked up domain is one of factors of success of a resource. Therefore sometimes online projects change the address, getting over on the new domain. But to the old address users still come. And sometimes the number of such visits is very considerable. Lose audience of a resource when changing the address it would be just silly. And in this case there is no nothing else left how to make readdressing from the website on the website.

It is required to you

  • The website functioning under control of the Apache server. The server configuration allowing application of the user files .htaccess. Active mod_rewrite module. Program FTP client. Data for access to the server on the FTP protocol.

Instruction

1. Unite to the website server by means of the program of the FTP client. It should be the server on which the website from which readdressing will be executed is placed. Data for access on FTP are usually published on the website of hosting company or in the control panel of a hosting.

2. Load the .htaccess file from the root directory of the website on the hard drive. If the .htaccess file is not observed in a root directory, check a status of a display mode of the hidden files on the server. If the mode is switched off, include it and update FTP listing. If the file is still not visible, just create the empty file with the name .htaccess on the hard drive of the computer.

3. Open the .htaccess file located on the hard drive in the text editor. It should be the editor of the plain-text, that is text without formatting. It should have a possibility of saving the file in the single-byte encoding compatible to latin-1 encoding.

4. Edit the .htaccess file. If it is necessary to make readdressing of all users from any url in the website on one url of other website, enter into the beginning of the .htaccess file of a line of the following view: RewriteEngine on
RewriteRule ^ <novyy_adres> [L, R=301] Here instead of a tag <novyy_adres> needs to register the address to which there will be a readdressing. For example, it can look so: RewriteEngine on
RewriteRule ^ http://codeguru.ru/ [L, R=301] If needs to make readdressing from a set of a website URL on similar url of other website (for example, when changing the domain of the website), then register in the beginning of the .htaccess file of a line of the following view: RewriteEngine on
RewriteRule ^ http://<novyy_domen> of % {REQUEST_URI} [L, R=301] For example, it can look so: RewriteEngine on
RewriteRule ^ http://codeguru.ru of % {REQUEST_URI} [L, R=301] Save the .htaccess file.

5. Load the .htaccess file into the root directory of the website. Use the program the FTP client. If the .htaccess file already exists in this directory, rewrite it.

6. Check how readdressing works. Open any address of the website from which readdressing should be made in the browser. If everything works normally, the browser will automatically load the page of other website.

Author: «MirrorInfo» Dream Team


Print