Pages: 1
Hello,
I am looking at changing the photo urls that are being printed in various categories/albums, tags, and other sections like Most Visited, Best Rated, etc.
When you go to any category/album, tags, or other sections, you will notice that the same photo is linked using the below mentioned url format resulting in duplicate pages:-
http://localhost/photos/picture/2-photoname/category/categoryname
http://localhost/photos/picture/2-photoname/most_visited
http://localhost/photos/picture/2-photoname/best_rated
http://localhost/photos/picture/2-photoname/tags/1-tagname
The canonical link for the actual photo would be http://localhost/photos/picture/2-photoname/ and I would like that one to be crawled in search engine. Luckily each variant of the photo page also has a canonical tag such as
<link rel="canonical" href="../../../picture/2-photoname">
I want to simply print the same url format in all the above mentioned and other such sections. The url format would be the one mentioned in the Canonical link and which is the actual photo page such as:
http://localhost/photos/picture/2-photoname/
Therefore, that involves remove the ending variables like "category/categoryname" from the end.
How can I achieve this? Which files would need to be edited for the same? Any suggestions!
Offline
Hello
You can take a look at include/functions_url file, but the system is really complex, I don't even understand how all works
but why to you want to achieve this ?
from my own experience most users don't care of urls at all (some even don't know what it is) and as soon as there is the "canonical" link there is not impact on SEO
Offline
oh and also, this part of the url is used by Piwigo to build the navigation thumbnails on picture.php (by knowing the current section), if you remove it, you won't be able to browse the "last photos" by using them (eg: without going back to the thumbnail page each time)
Offline
Thanks a lot. I will check it out. Another thing,
How do I change the <link rel="canonical" href="../../../picture/2-photoname"> to Absolute path?
Such as <link rel="canonical" href="http://www.domain.com/photos/picture/2-photoname">
Last edited by mdp (2013-12-20 13:27:55)
Offline
it's in the header.tpl file of your theme
but once again, there is no interest to change that
Offline
Pages: 1