ウェブサイトの AMP バージョンをセットアップし、ブラウザ経由でテストしましたが、AMP ワードプレス プラグインを使用して問題なく動作しています。次に、.htaccess ファイルにコードを追加して、モバイル デバイスを検出し、/amp/ バージョンに書き換えました。モバイル デバイスで amp のバージョンを検出できないため、.htacess コードに誤りがある場合はお知らせください。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#AMP Rewrite
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-]+)([\/]*)$ http://www.example.com/$1/amp/ [L,R=302]
</IfModule>