Wordpress .htaccess redirect question

Discussion in 'Programming' started by fly4food84, Jan 19, 2009.

  1. #1
    Here is what my current .htaccess file looks like. I'm trying to ensure I have the correct code to redirect mysite.com to www.mysite.com

    Does this look correct?

    # -FrontPage-
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName mysite.com
    AuthUserFile /home/mysite/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/mysite/public_html/_vti_pvt/service.grp
    Options +Indexes
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mysite\.com
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=permanent,L]
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ http://www.mysite.com/$1/ [L,R=301]
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress


    Thanks
     
    fly4food84, Jan 19, 2009 IP
  2. kentuckyslone

    kentuckyslone Notable Member

    Messages:
    4,371
    Likes Received:
    367
    Best Answers:
    0
    Trophy Points:
    205
    #2
    Just go to your general settings and be sure the "www" is included in the url of your blog and it will be fine.
     
    kentuckyslone, Jan 19, 2009 IP