Wordpres Redirection - How to Redirection URL

Discussion in 'WordPress' started by suresh599, Jul 23, 2011.

  1. #1
    This is my wordpress Default .htaccess..

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    So Here Where Should I place the script of these lines

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

    I tried many ways but i failed So Can any one tell me the rite way, How to redirect from http://domain.com to http://www.doamin.com
     
    suresh599, Jul 23, 2011 IP
  2. Aman Arora

    Aman Arora Active Member

    Messages:
    100
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #2
    Place is after #END Wordpress and it will work. Working awesome for me :)
     
    Aman Arora, Jul 23, 2011 IP
  3. waziuz

    waziuz Active Member

    Messages:
    783
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    80
    #3
    If you still find problem, just use the wordpress redirection plugin which has got a lot more features in addition to this. .. or use any canonical wordpress plugins .. many of the SEO plugins also come enabled with canonical url options .. and hope you have changed the default url to www in settings in dashboard.
     
    waziuz, Jul 23, 2011 IP
  4. cal_nz

    cal_nz Peon

    Messages:
    35
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I've found "Simple 301 Redirects" very easy to use
     
    cal_nz, Jul 24, 2011 IP
  5. cal_nz

    cal_nz Peon

    Messages:
    35
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Oops, I re-read and the answer I gave you, didn't answer your question.

    It's late....
     
    cal_nz, Jul 24, 2011 IP
  6. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #6
    Better you put it at the top of the .htaccess file.
     
    Abhik, Jul 24, 2011 IP