Need help with Wordpress htaccess file

Discussion in 'Blogging' started by Searchnology.com, Nov 16, 2009.

  1. #1
    Hello,

    I want my blog URLs to appear with the www subdomain. Currently the URLs appear as http://mydomain/blog but I want http://www.mydomain/blog

    I am using Wordpress 2.8.6 which produces an htaccess file like below.

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


    I found the code below that is suppose to accomplish this but my blog breaks when I add it the existing htaccess file.

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

    Thanks for any assistance.
     
    Searchnology.com, Nov 16, 2009 IP
  2. Blonde Jon

    Blonde Jon Active Member Affiliate Manager

    Messages:
    745
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    58
    #2
    You might want to post your question here:

    http://forums.digitalpoint.com/forumdisplay.php?f=49

    There are some very knowledgable people there that know their modrewrite stuff.
     
    Blonde Jon, Nov 16, 2009 IP
  3. ilook

    ilook Well-Known Member

    Messages:
    1,602
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    165
    #3
    Simply install your Wordpress in domain.com/blog instead of domain.com.:rolleyes:
     
    ilook, Nov 16, 2009 IP
  4. Searchnology.com

    Searchnology.com Peon

    Messages:
    451
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    That is where it is installed..:rolleyes::rolleyes:

     
    Searchnology.com, Nov 16, 2009 IP
  5. dynashox

    dynashox Premium Member Staff

    Messages:
    8,662
    Likes Received:
    563
    Best Answers:
    3
    Trophy Points:
    335
    #5
    Once login to your Wordpress dashboard, go to General Options/General Settings.

    Then, just add the www prefix in either the WordPress address (URL) or Blog address (URL).

    - Dynashox -
     
    dynashox, Nov 16, 2009 IP