There is many method of redirecting and only this method for redirecting is more suitable because in this time for redirecting is less , and not affect the meta data of website.In other methods like by php, meta refresh and javascript your time of redirection will take 1-2 sec , first go to same url and the redirect. So that’s why we use this htaccess method.
First what is htaccess ?
Full form of htaccess is “Hyper text access” . BY this website owner give permission of access the directory and pages , Sometime when we go to undefined url of website and page show 404 error , this is only done by this htaccess.
Now How to Use this ?
For using this you make a file with extension .htaccess and edit this according to your requirement like these
- Redirect entire website to another domain
Redirect 301 / http://www.liveurlifehere.com/
This is 301 redirection link for more about this read here>>
- Redirect entire website to another domain
Redirect 302 / http://www.liveurlifehere.com/
For more redirection from 302 read here >>
- Redirect from index.php/html to specific directory
Redirect /index.html http://www.liveurlifehere.com/blog/
- Redirect from one page to another page
Redirect /onedirectory/one.html http://liveurlifehere.com/blog/new.html
- Redirect from 404 error to specific page
ErrorDocument 404 /404.php
After that in this directory 404.php page must be there.
If you want to make this file in your pc then make in notepad and rename in host server by .htaccess
Leave a Reply