Two methods for 301 redirect with htaccess
Create a file called .htaccess and place in your root web folder with one of the follow declarations.
Copy and past the code between the line
Redirect a single page
------------------------------------------------------------------------
redirect 301 /old_page.htm http://www.you.com/new.htm
------------------------------------------------------------------------
Redirect all pages to a new extension (like asp to php)
------------------------------------------------------------------------
RewriteEngine on
RewriteBase /
RewriteRule (.*).asp$ /$1.php [L, R=301]
------------------------------------------------------------------------
Copy and past the code between the line
Redirect a single page
------------------------------------------------------------------------
redirect 301 /old_page.htm http://www.you.com/new.htm
------------------------------------------------------------------------
Redirect all pages to a new extension (like asp to php)
------------------------------------------------------------------------
RewriteEngine on
RewriteBase /
RewriteRule (.*).asp$ /$1.php [L, R=301]
------------------------------------------------------------------------
Labels: development, linux






0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home