开发者

OsCommerce - Remove osCsid in urls

I discovered that Google has indexed the osCsid parameter in some of my URLs at my osCommerce application. I tried to find a solution but I don't want to do something if I'm not sure what I'm doing. I only have access to the FTP and not the C开发者_StackOverflow中文版MS system. Is it possible to solve this problem through the FTP?


In your product_info.php add the following in the head section

<link rel="canonical" href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$_GET['products_id'],NONSSL,false); ?>" />

This will tell the search engines to use this url instead of the one being crawled, that contains the session id in it. This has been call more of a hint and not a directive, so there are other factors in play.

You also asked if you can do it with ftp access, yes you can.

Good resource on the topic: http://forums.oscommerce.com/topic/330479-what-is-the-oscsid-why-you-must-not-loose-it/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜