Brian Moon’s profile

A Web Engineer working mainly with LAMP (Linux, Apache, PHP and MySQL) for dealnews.com, phorum.org and others.

Latest Comments

1

Sean, Google stated in their blog post that they would be ignoring rel="canonical" for domains other than the current domain and that a 301 should be used to move a URL to another domain. I think that is a good rule for search engines for sure. Maybe for others.

Posted in Save the Internet with rev="canonical".

Fri, 10 Apr 2009 at 19:02:18 GMT


2

Heh, see what happens when you have been coding in PHP for 12 years? You don't know when some obscure feature is added to an existing function. I really would not expect the HTTP response code to be set by a third optional parameter of the header() function. That sounds like someone thinks the only use for the header function is the Location header. How do I set the status code to 404 for example? I don't need to send a header for that. Man, what a bad feature to stick on to the end of the header() function.

Posted in Save the Internet with rev="canonical".

Fri, 10 Apr 2009 at 18:42:32 GMT


3

Eli, according to Google's blog post about rel="canonical" you have it backwards. Now, it could be them, but the 800lb. gorilla will dictate usage.

From http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html:

Now, you can simply add this <link> tag to specify your preferred version:

<link rel="canonical" href="http://www.example.com/product.php?item=swedish-fish" />

inside the <head> section of the duplicate content URLs:

http://www.example.com/product.php?...ory=gummy-candy

http://www.example.com/product.php?...;sessionid=5678

and Google will understand that the duplicates all refer to the canonical URL: http://www.example.com/product.php?item=swedish-fish. Additional URL properties, like PageRank and related signals, are transferred as well.

Posted in Save the Internet with rev="canonical".

Fri, 10 Apr 2009 at 18:26:18 GMT


4

A simple 301 redirect would achieve the same thing. If you can issue a header() function in PHP, you can send a 301. I think the canonical stuff was added to Google and others for people that can't send headers from their content due to their limited architecture or even in the case of static content.

<?php
 
    header('HTTP/1.x 301 Moved Permanently');
 
    header('Status: 301 Moved Permanently');
 
    header('Location: http://shiflett.org/articles/cross-site-request-forgeries');
 
?>

Posted in Save the Internet with rev="canonical".

Fri, 10 Apr 2009 at 18:21:38 GMT


5

I have always been a big fan of nice URLs too Chris. But, I have not taken it to that extreme...... yet. But you are giving me ideas. =)

Posted in URLs Can Be Beautiful.

Fri, 14 Mar 2008 at 02:59:37 GMT


About

  • Twitter: @brianlmoon
  • Location: Alabama
  • Joined: March 2008
  • Comments: 5