WordPress 2.0: Adding Permanent Re-direct to .htaccess
-
I have been upgrading several old static websites lately to WordPress. In order to transfer the pagerank in Google over to the new website, you need to create permanent redirects for each of the old .html pages in the .htaccess file.
After searching numerous websites for info on how to do this, I finally got this to work. Here is what your .htaccess file should look like after you have added in your permanent re-directs. You will need one re-diect for each old page.Each re-direct should be on one line only, not two, with a single space between the old page name and new location. Make sure you pay attention to the forward slashes: one before the old page name, and none at the end of the new page location.
*Note: Remove the [] from the location of the new page shown below.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Redirect permanent /old_page.htm [https://www.yoursite.com/new_page]
Redirect permanent /old_page2.htm [https://www.yoursite.com/new_page2]
</IfModule># END WordPress
- The topic ‘WordPress 2.0: Adding Permanent Re-direct to .htaccess’ is closed to new replies.