.htaccess question

Discussion in 'Search Engine Optimization' started by peaches, Feb 20, 2007.

  1. #1
    Hey, I was wondering if someone could help me with this.

    I have a blog at lets say blog.example.com

    and I move it to example.com

    Now how can I redirect everything from the old blog to the new so that lets say someone visits a link that says

    blog.example.com/ppc/whatsmyname

    to goto example.com/ppc/whatsmyname

    or whatever the link may be...I need it to do it for all the links and not just one

    so if it was

    blog.example.com/ppc/whatsmyname
    blog.example.com/ppc/whatsmyname2
    blog.example.com/ppc/whatsmyname3

    all would goto

    example.com/ppc/whatsmyname
    example.com/ppc/whatsmyname2
    example.com/ppc/whatsmyname3

    Thanks very much for any help!
     
    peaches, Feb 20, 2007 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    blog.domain.com/.htaccess

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
     
    Nintendo, Feb 20, 2007 IP