安装和激活Amp插件 - 但没有任何不同,也没有检测到放大器页面

问题描述 投票:-2回答:1

我刚刚安装并激活了Amp插件(wordpress.org/plugins/amp)。我在安装过程中没有遇到任何问题。

我清除了缓存并在移动设备上检查了我的网站,看看它现在是如何显示的,没有区别。

激活插件后我还需要做更多的事吗?

wordpress accelerated-mobile-page
1个回答
0
投票

试试这个以重定向您的用户我们在移动设备上(除了我们的评论):

RewriteEngine On
RewriteCond %{REQUEST_URI} !/amp$ [NC]
RewriteCond %{HTTP_USER_AGENT} (android|blackberry|googlebot\-mobile|iemobile|iphone|ipod|\#opera\ mobile|palmos|webos) [NC]
RewriteRule ^([a-zA-Z0-9-]+)([\/]*)$ https://example.com/$1/amp [L,R=302]

取自here

© www.soinside.com 2019 - 2024. All rights reserved.