You are here:  » Full domain name in internal links

Support Forum



Full domain name in internal links

Submitted by anhmocboc on Wed, 2008-03-19 04:24 in

How can I print full url in all search result pages.
Right now it display:
../../product/product-name.html
and
product/product-name.html

I want it display full url:
http://www.mydomain.com/shopping/product/product-name.html

I installed PriceTapestry in the directory "shopping" and using Rewrite.

Thanks

Submitted by support on Wed, 2008-03-19 16:35

Hi,

In search.php look for the following code starting at line 166:

        $searchresults["products"][$k]["productHREF"] = "product/".tapestry_hyphenate($product["name"]).".html";
        if ($rewrite) $searchresults["products"][$k]["productHREF"] = "../../".$searchresults["products"][$k]["productHREF"];

...and simply replace this with just the following line:

        $searchresults["products"][$k]["productHREF"] = "http://www.example.com/shopping/product/".tapestry_hyphenate($product["name"]).".html";

Thanks for your note about the 302 link hi-jacking. It doesn't seem to be a widespread problem with the main search engines any more - I understand that they are treating 302 redirects to a different domain just as any normal link (with onsite 302 treated as normal).

Scraping is still a widespread issue which can look the same as a 302 hi-jack if the scraped page is doing a redirect direct to a merchant (via their own affiliate link); but showing the scraped page to Googlebot (the snippet of which of course includes your site / URL whenever your search for your URL in the serps).

Cheers,
David.

Submitted by anhmocboc on Wed, 2008-03-19 21:40

Thank David.

Submitted by support on Thu, 2008-03-20 12:09

Hi,

Sure - that can be done. In jump.php, look for the following code near the end:

  header("Location: ".$product["buy_url"]);

...and simply replace this as:

  header ("HTTP/1.1 301 Moved Permanently");
  header("Location: ".$product["buy_url"]);

Cheers,
David.

Submitted by anhmocboc on Thu, 2008-03-20 16:52

Great. Thank you very much.
Where can I change jump.php?id=123456 to full url path ?
Right now it display /shopping/jump.php?id=123456
Thanks

Submitted by support on Thu, 2008-03-20 17:00

Hi,

To change that, look in includes/tapestry.php for the following code (line 55):

return $config_baseHREF."jump.php?id=".$product["id"];

...and replace that with:

return "http://www.example.com/shopping/jump.php?id=".$product["id"];

Cheers,
David.

Submitted by clare on Wed, 2008-04-02 23:19

Do you think that cloaking the sitemap so that only recognised spiders could access it, as described here
http://www.joostdevalk.nl/cloak-your-sitemap/

Might stop this happening so much, as I see it happening alot to my site. I am not sure if it does any harm or not, but imagine it does.

Submitted by support on Thu, 2008-04-03 08:09

Hi Clare,

If you're confident that the code will permit genuine spiders then it should work fine. My only concern over cloaking is what happens when the test conditions used by whatever cloaking method you use no longer match the source (e.g. the name of the crawler changes) - this could result in your sitemap being blocked unnecessarily until you become aware of the issue...

Cheers,
David.

Submitted by clare on Thu, 2008-04-03 09:45

Yes, its probably not an ideal solution, also some websites legitmately scrape the site and put content on their site that gives a link back to mine, I could never identify such, so I guess its just one of those things and probably not worth worrying about too much.

Thanks