Wordpress Script: Redirection

Discussion in 'PHP' started by TechMaster, Nov 9, 2009.

  1. #1
    I am using wordpress blogging script. I have blog on subdomain. Now i want to move my blog to main domain.

    I have copied all the content to home directory
    I have changed setting in dashboard >> general setting.

    How do i make all post 301 redirection to new URL.

    Take note that I wan to redirect exact post URL to its new exact URL.

    For example,

    http://blog.domain.com/2009/11/post-url/

    Redirects to....

    http://www.domain.com/2009/11/post-url/
     
    TechMaster, Nov 9, 2009 IP
  2. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #2
    .htaccess for http://blog.domain.com root directory
    RewriteEngine on
    RewriteBase /
    RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
    Code (markup):
     
    AsHinE, Nov 9, 2009 IP
  3. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #3
    be sure to add www. before domain.com above too
    You will also need to amend the options in the wp_options table to reflect the new URL
     
    JAY6390, Nov 9, 2009 IP
  4. TechMaster

    TechMaster Peon

    Messages:
    225
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Done successfully. Moved blog.lasvak.com to www.lasvak.com.

    Thanks for help.
     
    TechMaster, Nov 9, 2009 IP