You will need
  • Website, operated by the Apache server. Server configuration, enabling the use of custom files .htaccess. Active the mod_rewrite module. Program FTP client. Data to access the server via FTP.
Instruction
1
Connect to the server site by using an FTP client. It must be a server that hosts a website from which they will be forwarded. Data for FTP access is usually published on the website of the hosting company or the hosting control panel.
2
Download the file .htaccess from the root directory of the website on the hard disk. If file .htaccess is not observed in the root directory, check the mode status display the hidden files on the server. If the mode is off, turn it on and refresh FTP listing. If the file is still not visible, just create an empty file with the name .htaccess on the hard drive of your computer.
3
Open the file .htaccess file located on the hard disk in a text editor. It should be a editor plain-text, i.e. text without any formatting. He should be able to save a file in single-byte encoding, compatible with latin-1.
4
Edit the file .htaccess. If you need to redirect all users from any url within the website on one url of another site, enter in the beginning of the file .htaccess line: RewriteEngine on
RewriteRule ^ <novyts> [L,R=301]Here is the label: <novyts> need to specify the address which will be redirected. For example, it might look like this: RewriteEngine on
RewriteRule ^ http://codeguru.ru/ [L,R=301]If you want to perform the redirect set the url of the website on the same url of another site (for example, when changing domain name of the website), then write to the file .htaccess line: RewriteEngine on
RewriteRule ^ http://<novyae>%{REQUEST_URI} [L,R=301]for Example, it might look like this: RewriteEngine on
RewriteRule ^ http://codeguru.ru%{REQUEST_URI} [L,R=301]Save the file .htaccess.
5
Download the file .htaccess in the root directory of the website. Use your FTP program. If the file .htaccess already exists in this directory, overwrite it.
6
Check out how it works forwarding. Open a browser to an address of the websitefrom which you should be forwarding. If everything works fine, the browser will automatically load the page on another site.