Redirect help please?

Discussion in 'PHP' started by Browning, Dec 31, 2008.

  1. #1
    I deleted the blog from a new site of mine and it does indeed have some indexed pages in google. Is there a way I can set it up so that all those pages that are no longer there redirect to the main url?

    Not sure if it makes any difference but the domain is now setup with a forum, instead of the blog
     
    Browning, Dec 31, 2008 IP
  2. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #2
    Try it at you own risk ... lol

    I presume that you blog url looks like: http://www.example.com/blog/...
    for a simple redirection using .htaccess file (located on the same directory that contained the blog/ directory prior to deletion):

    .htaccess file content:
    RewriteRule ^/blog.*$ http://www.example.com/forum/ [R=301]
    Code (markup):
    More info about your directory structure may help
     
    nabil_kadimi, Dec 31, 2008 IP
  3. tarponkeith

    tarponkeith Well-Known Member

    Messages:
    4,758
    Likes Received:
    279
    Best Answers:
    0
    Trophy Points:
    180
    #3
    I'm not positive, but believe that the pages will be removed from google when the googlebot tries to visit them again and sees the 404 error...
     
    tarponkeith, Dec 31, 2008 IP
  4. nabil_kadimi

    nabil_kadimi Well-Known Member

    Messages:
    1,065
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    195
    #4
    That's right, but setting a 301 redirect is better for SEO.
     
    nabil_kadimi, Dec 31, 2008 IP