WordPress.org

Support

Support » How-To and Troubleshooting » Redirecting www.domain to domain.com !?!?!?

Redirecting www.domain to domain.com !?!?!?

  • I know I need to add code to my .htaccess file but that was already done…the problem is, where is the code suppose to be places within the rest of the file’s code? Please help… Here is my code : : : :

    # 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
    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.keihead\.com$ [NC]
    RewriteRule ^(.*)$ http://keihead.com/$1 [R=301,L]
Viewing 6 replies - 1 through 6 (of 6 total)
  • When I type in domain.com it does not work. but if i type http://domain.com it works -__-

    I want people to be able to type domain.com ! without www. in the front…

    Moderator Jan Dembowski

    @jdembowski

    Volunteer Mod. & Brute Squad

    If you haven’t already done so, backup your database and files. This is your safety net.

    http://codex.wordpress.org/WordPress_Backups
    http://codex.wordpress.org/Backing_Up_Your_Database
    http://codex.wordpress.org/Restoring_Your_Database_From_Backup

    Make sure that your site url is set as you want it to be first.

    http://codex.wordpress.org/Changing_The_Site_URL

    The canonical URLs should handle it from there as long as your webserver is sending the request to the same place.

    WordPress 2.3: Canonical URLs

    If the rewrite rule is needed than you want the rewrite rule to work first so put this part

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

    above this part

    # 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

    I read a post that says this :
    I was wondering if there is a way to remove post from this support forum. The reason I am asking is because I used a link to version 2 of our website, now when people search for our domain name at google, they get the support forum post as a result. This provides a link to version 2 of our website and I didn’t mean to let the cat outta the bag.

    Any help would be appreciated, thanks in advance,

    I request the same. I need to remove this post for search engine reasons.
    please help

    See this is me!

    How do i remove the links from all of the posts that have my site’s url in it??!!

    I hate the fact that just because I post my code on here that includes my url, it stays forever
    I don’t want wordpress.org to show up when people search my site on google.
    I don’t need peopel knowing how I got my website up…please help

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Redirecting www.domain to domain.com !?!?!?’ is closed to new replies.