Forums

'domain.com' to go to 'www.domain.com' (4 posts)

  1. dvnmolly
    Member
    Posted 1 year ago #

    trying to get this domain http://txtpronews.com/

    to go to http://www.txtpronews.com

    this is the current htaccess file...

    # 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

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    # Redirect non-www to www
    RewriteCond %{HTTP_HOST} !^www\.
    RewriteRule (.*) http://www.domain.net/$1 [R=301,L]

    where domain is your domain

  3. dvnmolly
    Member
    Posted 1 year ago #

    can you give me the exact code because i tried to do what you said like this>:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{http_host} ^txtpronews.com [nc]
    RewriteRule ^(.*)$ http://www.txpronews.com/$1 [r=301,nc]
    </IfModule>

    # END WordPress

    and it didnt work - it took my site down.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    sorry, you got the code right, itjust goes above the #BEGIN WordPress bit

Topic Closed

This topic has been closed to new replies.

About this Topic