Announcement

#1 2015-11-09 03:56:22

kyp_
Member
2013-06-17
84

Dynamic URL in header.tpl

Hello,

it seems that googlebot-mobile is little bit confused about telling the difference between
the mobile and desktop version.

The mobile bot fetches $show_mobile=false and then complains that it is not mobile-ready, ...yeah.

So I read that I have to change the canonical/alternate so that the googlebot does not get confused.

Mobile:

Code:

<link rel=”canonical” href=”http://www.domain.com/desktop-page/”/>

and on the Desktop Version:

Code:

<link rel=”alternate” media=”only screen and (max-width: 640px)” href=”http://m.domain.com/mobile-page/”/>

Now what syntax do I have to use in each themes header.tpl to create a dynamic URL for each individual page, for the href to be correct?


cheers
kyp


Piwigo 2.7.4
PHP: 5.3.3
MySQL: 5.1.73


Cheers

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact