Support » Fixing WordPress » Strange Canonical Problem

  • Everytime I type in my URL onto the bar without the WWW, it goes to WWW and shows on the bar, which is what I want, so in that regard, I have no issues.

    HOWEVER

    When I go to Google (or any other search engine) and search for my URL and click on a page on my site that looks like:

    http://website.com/page
    http://website.com/2009/08/blog-post

    (notice no WWW)

    it just redirects to the homepage (http://www.website.com), rather than going to that specific blog post or page that I clicked from the search engine

    Here is what my .htaccess file looks like:

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

    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^website\.com
    RewriteRule ^(.*)$ http://www.website.com/$1 [R=permanent,L]
    RewriteBase /
    RewriteRule ^index\.(htm|html|php) http://www.website.com/ [R=301,L]
    RewriteRule ^(.*)/index\.(htm|html|php) http://www.website.com/$1/ [R=301,L]

    </IfModule>

    # END WordPress

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Strange Canonical Problem’ is closed to new replies.