301 Redirect Not working

Discussion in 'Apache' started by SniperUK, May 9, 2011.

  1. #1
    Hi i've deleted some static .htm pages. The site has been converted to a wordpress site. I've tried adding the following to .htaccess file but has not worked:

    Redirect 301 /old.html http://www.mysite.com/page1/

    Essentialy i want to redirect the old individual html pages to new directory structure wordpress creates when creating each page.
     
    SniperUK, May 9, 2011 IP
  2. MartinPrestovic

    MartinPrestovic Peon

    Messages:
    213
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Post the entire contents of your .htaccess file please.
     
    MartinPrestovic, May 9, 2011 IP
  3. DaleB

    DaleB Peon

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,

    There are three things you can do:

    1) Apache .htaccess Singe Page Redirect

    Redirect 301 /old/oldpage.htm /new/http://www.mysite.com/page1

    2) Apache .htaccess Canonical Redirect

    Follow the same steps as before but insert the code below instead (it will redirect all the visitors accessing http://domain.com to http://www.domain.com)

    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

    3) Install the Simple 301 redirects Plugin

    Good luck :)
     
    DaleB, May 10, 2011 IP
  4. pinellashosting

    pinellashosting Member

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #4
    This is what we use for 301 redirect almost the same as above but works great..

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.pinellashosting.com/$1 [R=301,L]
     
    pinellashosting, May 10, 2011 IP