Hello David,
I hope you are well.
I have now two price tapestry sites, one is for desktop browsing and the other is for smartphone.
Their URLs look like this :
http://shop.example.com/ (for Desktop)
http://shop.example.com/m/ (for Smartphones)
I would like to set "rel="canonical" attribute in header section of all pages in http://shop.example.com/m/ , telling search engines that those pages are copies of Desktop versions.
Should I do something like obtaining current URL, remove "/m/ and printing it in "href=" ?
Your advice is greatly appreciated.
Kind regards,
Juliank
Hello David,
It worked ! Thanks a lot for your great support.
I am really lucky to have chosen Price Tapestry !
Cheers,
Julian
Hi Julian,
Sure - you could add the following to m/includes/header.php just before the closing <head> tag...
<link rel='canonical' href='<?php print str_replace("/m/","/",$_SERVER["REQUEST_URI"]); ?>' />
Cheers,
David.
--
PriceTapestry.com