Fli
07-18-2013, 04:31 PM
If you have one subpage and you wish to redirect all traffic to another page, you can use this code in .htaccess file
redirect 301 /page.php http://domain.com/page.php
Note that old page is only /page.php or page.php , not http://
then if you need to redirect including URL parameters (page.php?name=john&surname=doe) you can redirect .php page to a different page with same parameters using following .htaccess file lines:
RewriteEngine on
RewriteRule ^local-source-page\.php$ https://new.domain.tld/newpage.php [L,R=301]
You can also use redirect htaccess generator like http://www.rapidtables.com/web/tools/redirect-generator.htm
There is whole domain redirect: http://internetlifeforum.com/editing-coding-programming/1645-htaccess-redirect-old-domain-new-domain-index/
redirect 301 /page.php http://domain.com/page.php
Note that old page is only /page.php or page.php , not http://
then if you need to redirect including URL parameters (page.php?name=john&surname=doe) you can redirect .php page to a different page with same parameters using following .htaccess file lines:
RewriteEngine on
RewriteRule ^local-source-page\.php$ https://new.domain.tld/newpage.php [L,R=301]
You can also use redirect htaccess generator like http://www.rapidtables.com/web/tools/redirect-generator.htm
There is whole domain redirect: http://internetlifeforum.com/editing-coding-programming/1645-htaccess-redirect-old-domain-new-domain-index/