Welcome to WebmasterWorld Guest from 54.145.246.183

Forum Moderators: Ocean10000 & incrediBILL & phranque

canonical fix fails

trying to explain why

   
6:43 pm on Mar 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello,

I'm coming across a strange issue about canonical fix with my domain.

If I type in the browser address bar my canonical domain name (www.example.com) it works correctly;
If I type in a non canonical request such as example.com, with no-www, it seems to redirect correctly to the canonical domain.

so, you are going to ask me where is the problem...

..If I create a link from another site for non canonical request, redirect doesn't happen and a browser error appears.

that sounds strange to me...am I wrong?

Anyway, I added the canonical fix in my root .htaccess file, along with my existing wordpress settings, but, still,redirect doesn't happens:

My current .htaccess file it's like that:

Options +FollowSymLinks
RewriteEngine on

# Redirect all non-canonical domain requests to requested resource in canonical domain
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

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

# END WordPress

What's wrong with it?

tnx...

[edited by: jdMorgan at 10:11 pm (utc) on Mar. 9, 2009]
[edit reason] example.com [/edit]

8:04 pm on Mar 9, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



There's nothing wrong with that code, but there might be something else interfering with it.

However, I don't understand how there can be a difference, unless there's something elsewhere that looks at referrers or something.

8:09 pm on Mar 9, 2009 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



> there might be something else interfering with it

WordPress does its own canonical fixing with PHP - what happens when you comment out the canonical redirect section of the above .htaccess file? Also what specific error are you getting? Is the domain name set correctly in the WordPress admin control panel?

8:35 pm on Mar 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the canonical fix part in the .htaccess file doesn't change the situation in any way.
It simply makes no difference.

Trying to connect to the site trough a non-canonical link the browser returns to me that error:
"Site/address not found"...

(Firefox)

urls in Wordpress settings are correctly set on canonical one.

8:51 pm on Mar 9, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



What is the status code (use Live HTTP Headers for Firefox, or similar, to see it) returned for those URLs?

[edited by: g1smd at 9:20 pm (utc) on Mar. 9, 2009]

9:18 pm on Mar 9, 2009 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



"Site/address not found"...

Looks like a DNS zone file setup error.

Jim

10:01 pm on Mar 9, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the status code (use Live HTTP Headers for Firefox, or similar, to see it) returned for those URLs?

what exactly should I see? I have a hundreds lines long report...

@jd: what if it is a DNS issue?

5:21 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...anyone?
6:44 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Out of ideas. Ask your hosts to check things out.
7:59 pm on Mar 10, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, I'll do it.

anyway thanks for support.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month