Problems with .htaccess

Discussion in 'HTML & Website Design' started by Kamikaze, Jul 5, 2008.

  1. #1
    I'm just working on a wordpress blog. Every time I type an address, it removes the www from the address, and I don't want that (actually I want the opposite, if the www is not there it should be automatically added). I suposse I need to change something in my .htaccess file, but I can't make it work.

    I've found info in the Internet saying "add these two lines to your .htaccess file to solve it" and things like that... but when I add those lines the website never shows up with an "Internal Server Error". My guess is that something else needs to be changed or removed from the .htaccess file. Here's how it is right now:

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

    # END WordPress

    Any help with this will be greatly appretiated.
     
    Kamikaze, Jul 5, 2008 IP
  2. Stryder

    Stryder Guest

    Messages:
    124
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What you need is the following code:
    taken from hxxp://www.besthostratings.com/articles/force-www-htaccess.html
     
    Stryder, Jul 5, 2008 IP
  3. gigapros

    gigapros Active Member

    Messages:
    71
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    65
    #3
    I think you can fix this thru your wordpress settings (in your WP admin). Set your site link as "www.yoursite.com" (instead of "yoursite.com").
     
    gigapros, Jul 5, 2008 IP
  4. kentuckyslone

    kentuckyslone Notable Member

    Messages:
    4,371
    Likes Received:
    367
    Best Answers:
    0
    Trophy Points:
    205
    #4
    Yes, that is correct and will solve your problem.
     
    kentuckyslone, Jul 5, 2008 IP
  5. Kamikaze

    Kamikaze Peon

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yeah... it was easily fixed in WP settings...

    Thanks for your help!
     
    Kamikaze, Jul 6, 2008 IP