View Single Post
Old July 7th, 2009, 08:23 PM   #1 (permalink)
disalex
Member
Verified Customer
 
Join Date: Sep 2005
Posts: 43
Specifying Canonical URL

I am getting slammed with duplicates because the way these links are setup.

I need a way to have this code <link rel="canonical" href="showproduct.php/$id/" /> added to the header of the showproduct.php page so I can tell the spiders not to use the 100 possible variations. How can I call the product ID of the page within the <head> tag of the /showproduct.php page?

I want this to be what they index.

/showproduct.php/product/651/

Not these..

‎/showproduct.php/product/651/cat/397/date/1238724630
‎‎/showproduct.php/product/651/cat/397/date/1238726904
‎‎/showproduct.php/product/651/cat/397/si/epcot/date/1238723828‎‎/showproduct.php/product/651/cat/397/si/norway/date/1238723828‎‎/showproduct.php/product/651/cat/397/sl/g/date/1238724187‎‎/showproduct.php/product/651/cat/397/sl/g/date/1238724323‎‎/showproduct.php/product/651/cat/397/sl/i/date/1238724630‎‎/showproduct.php/product/651/cpage/2/date/1238724323‎‎
/showproduct.php/product/651/cpage/2/date/1238724630‎‎
/showproduct.php/product/651/cpage/2/perpage/15‎‎
/showproduct.php/product/651/cpage/2/si/epcot,/date/1238723828‎‎/showproduct.php/product/651/cpage/2/si/epcot/date/1238723828‎‎/showproduct.php/product/651/cpage/2/si/norway/date/1238723828‎‎/showproduct.php/product/651/cpage/2/si/showcase
‎‎/showproduct.php/product/651/cpage/2‎‎
/showproduct.php/product/651/date/1238722288‎‎
/showproduct.php/product/651/date/1238724630
‎‎/showproduct.php/product/651/perpage/15‎‎
/showproduct.php/product/651/ppuser/1721/date/1238724630‎‎/showproduct.php/product/651/si/epcot/date/1238723828
‎‎/showproduct.php/product/651/si/showcase
‎‎/showproduct.php?product=651&cpage=2&sort=&perpage=15&cat=397‎
disalex is offline   Reply With Quote