Forums

Redirect www.domain.com to domain.com. (10 posts)

  1. handshakemedia
    Member
    Posted 10 months ago #

    I can not for the life of me find understandable, step-by-step instructions on how to direct http://www.thehandshakemagazine.com to http://thehandshakemagazine.com. everything I've found so far is either uber-advanced or doesn't work, and any plugins that say taht they do such a thing turn out to be worthless. Can anybody help me out?

  2. Big Bagel
    Member
    Posted 10 months ago #

    Will this link do the trick?

  3. handshakemedia
    Member
    Posted 10 months ago #

    Hey there. Whether this link will do the trick or not all depends:

    Is it telling me that all I have to do is the following:

    1. Open .htaccess in my root directory.

    2. Drop in this:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
    RewriteRule ^(.*) http://%1/$1 [R=301,L]

    3. Save and re-upload .htaccess.

    Poof? Done? Where do I put that code in .htaccess? Anywhere?

    Thanks!

  4. Big Bagel
    Member
    Posted 10 months ago #

    Yup, that should do it. It has apache redirect all browsers from http://www.anything.whatever to anything.whatever.

    The author of that article (and I) both suggest putting that at the beginning of your .htaccess file.

  5. Big Bagel
    Member
    Posted 10 months ago #

    Bah...

    The forum made one of those examples a link, but I think you get the idea.

  6. handshakemedia
    Member
    Posted 10 months ago #

    Awesome. Before [# BEGIN WordPress] ?

    Or after?

  7. handshakemedia
    Member
    Posted 10 months ago #

    Oh. Wait. This is already in my .htaccess:

    # 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

    What's going on there?

  8. Big Bagel
    Member
    Posted 10 months ago #

    Before, but only to keep it separated from the WordPress rules. (It technically shouldn't matter)

  9. Big Bagel
    Member
    Posted 10 months ago #

    That's WordPress's normal rules to enable pretty permalinks.

  10. handshakemedia
    Member
    Posted 10 months ago #

    Got it. It worked! Thanks for your help.

Reply

You must log in to post.

About this Topic