-2

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

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

激活插件后我还需要做什么吗?

4

1 回答 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]

取自这里

于 2016-09-14T07:12:02.413 回答