I got my wordpress problem..anyone help??

Discussion in 'Search Engine Optimization' started by Querall, Feb 26, 2008.

  1. #1
    I digital forum members..I just trying using the search function to find out about 301 redirect..but no one related to my problem..

    I try to redirect my old address http://bentdaniel.com to http://www.bentdaniel.com. the problem is...once I download the .htaccess this following code already exist:

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

    # END WordPress

    Most of the tutorial in this forum just give the code like this:
    RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.yourdomain/$1 [R=301,L]

    I try the code..I put it at upper and down and erase the existence code but that didn't work..can anyone SEO expert help me..?
     
    Querall, Feb 26, 2008 IP
  2. integrity

    integrity Well-Known Member

    Messages:
    1,999
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    180
    #2
    Hello,

    In your .htaccess file put the following (after leaving one line of free space):

    redirect 301 http://bentdaniel.com/ http://www.bentdaniel.com/

    ----------------

    Should do the trick.

    But I don't even know if you can do a 301 on a non-www to a www :confused:
     
    integrity, Feb 26, 2008 IP
  3. Querall

    Querall Peon

    Messages:
    381
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I try this trick but didn't work at all..anyway appreciate that..another solution please?
     
    Querall, Feb 26, 2008 IP
  4. integrity

    integrity Well-Known Member

    Messages:
    1,999
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    180
    #4
    Sorry dude.

    I'm no expert. That's all I got. :(
     
    integrity, Feb 26, 2008 IP
  5. astup1didiot

    astup1didiot Notable Member

    Messages:
    5,926
    Likes Received:
    270
    Best Answers:
    0
    Trophy Points:
    280
    #5
    
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^http://bentdaniel\.com$ [NC]
    RewriteRule ^(.*)$ http://www.bentdaniel.com/$1 [R=301,L]
    
    Code (markup):
    Insert the above code just before the </ifmodule> tag.
     
    astup1didiot, Feb 26, 2008 IP
  6. Querall

    Querall Peon

    Messages:
    381
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I just insert the code just before the </imodule> tag but nothing change at all..my address still remind display my old URL.

    P/s: I'm using linux server (I think that is no problem here).
     
    Querall, Feb 26, 2008 IP
  7. wantmomoney

    wantmomoney Peon

    Messages:
    239
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    What registrar have you used to register your domain? Many registrars will allow you to manage redirects from their own control panel instead of you having to manipulate the code on your website. That would be my advice. Don't mess with your website code, instead create the redirect at the registrar level.

    I am able to do this with cheap-domainregistration.com, and godaddy is the same way. What is your registrar? I would be surprised if you don't have this option there.
     
    wantmomoney, Feb 27, 2008 IP
  8. integrity

    integrity Well-Known Member

    Messages:
    1,999
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    180
    #8
    Yeah, he can do that. But he is 301ing his domain minus the www to go to his domain with the www. No registrar can do that. :(
     
    integrity, Feb 27, 2008 IP