301 for all URLS in forum

Discussion in 'Apache' started by mark_s, May 10, 2008.

  1. #1
    Currently my forum is /talk/topic.html but I will be changing to /forum/topic.html... is there something I can put in the htaccess file that means when I have made this change, when google goes to the old urls (thousands of them) it will automatially 301 to the new location>
     
    mark_s, May 10, 2008 IP
  2. apachehtaccess

    apachehtaccess Guest

    Messages:
    82
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RedirectMatch 301 ^/talk/(.+)$ http://site.com/forum/$1
    Code (markup):
     
    apachehtaccess, May 10, 2008 IP
  3. mark_s

    mark_s Peon

    Messages:
    497
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Will that redirect them to the forum home page or still take them to the correct thread? I need the latter.
     
    mark_s, May 11, 2008 IP