• Okay I’ve looked at 3 different posts on this and I haven’t been able to get the solutions provided in the other posts to work.

    I want all utahlibertylaw.com requests to redirect to http://www.utahlibertylaw.com

    I’ve been trying this, but it isn’t working

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^utahlibertylaw.com$ [NC]
    RewriteRule ^(.*)$ http://www.utahlibertylaw.com/$1 [R,L]
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    </IfModule>

    # END WordPress

Viewing 1 replies (of 1 total)
  • Use this above the WordPress rewrite block; don’t mix it in with the WP rewrite block:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.utahlibertylaw\.com
    RewriteRule (.*) http://www.utahlibertylaw.com/$1 [R=301,L]
    </IfModule>

    BTW, you have a very wacky non-standard host set up, with different web sites at http://www.utahlibertylaw.com and at utahlibertylaw.com . Only one website belongs on a domain, with or without the www. If the redirect doesn’t work, that’s why.

    You can add/delete the www to a domain in WordPress admin dashboard – Settings>>General – without the need for an .htaccess rule. But that’s only if you are doing what 99.9% of everyone else is doing, which is one site per hosted domain.

Viewing 1 replies (of 1 total)
  • The topic ‘redirect from domain.com to www.domain.com’ is closed to new replies.