Redirecting requests for Web Pages
Redirecting http requests for x.html using .htaccess file:
If your website already has a .htaccess file in the root directory of your website, edit a copy of the existing file. Add your redirections immediately after the Files section - it may looks like this:
<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>
If there is no .htaccess file, you will create one and add your redirections using a text editor (NoteTab, Notepad). Edit the path /directory1/file1.html to the path in this domain of the page. Then edit the new path or URL of the location it has moved to. Do not change any other characters.
Save the files as .htaccess and upload to your original website. Now, when you request the original webpage, it will automatically be redirected to the new location. You can add as many redirection lines as you like.
Copy plain text code:
Redirect permanent /directory1/file1.html http://www.x.com/new/file1.html
Redirect permanent /directory2/file2.html http://www.x.com/new/file2.html
Redirecting domain requests (x.com to www.x.com)
|