301 redirect in addition to Wordpress's automatic .htaccess

Discussion in 'Site & Server Administration' started by Breakaway11, Jul 2, 2008.

  1. #1
    When i install a wordpress blog, it automatically creates an htaccess file and redirects it from the www. version to the non-www. version. In addition to that, I want to add about 10 old page to new page redirects... How would I do that?

    The current redirect is:

    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.wiifitaccessories.com
    RewriteRule (.*) http://wiifitaccessories.com/$1 [R=301,L]
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    Code (markup):
    Thanks for your help.
     
    Breakaway11, Jul 2, 2008 IP
  2. Breakaway11

    Breakaway11 Well-Known Member

    Messages:
    882
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    120
    #2
    anyone? please help... i want to merge an existing site to wordpress, but want to redirect all of the pages to the new posts.
     
    Breakaway11, Jul 2, 2008 IP
  3. Actor Mike

    Actor Mike Peon

    Messages:
    333
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Insert the following line of code underneath your existing lines of code:

    redirect 301 /oldpage.html http://www.yourdomain.com/newpage.html
    Code (markup):
    Should work OK. Don't forget to leave a line space after the previous code (i.e. after "# END Wordpress")
     
    Actor Mike, Jul 8, 2008 IP