I would like to redirect the site with ?amp at the end of url when I access it with my smartphone, but when I access it with my smartphone, there is a loop.
Could you tell me where the problem is?
The code is as follows:
RewriteEngine on
RewriteCond%{HTTPS} off
RewriteRule^(.*)$https://%{HTTP_HOST}%{REQUEST_URI}[R=301,L]
RewriteEngine on
RewriteCond%{REQUEST_URI}!\?amp
RewriteCond%{HTTP_USER_AGENT} (iPod|iPhone|iPhone|iPhone|Android|Windows\Phone)
RewriteRule^(.*)$1\?amp[R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule^index\.php$ - [L]
US>RewriteCon%{REQUEST_FILENAME}!-f
RewriteCon%{REQUEST_FILENAME}!-d
RewriteRule./index.php [L]
</IfModule>
# END WordPress
The query string amamp は is set to %{QUERY_STRING}
instead of %{REQUEST_URI}
.
575 Who developed the "avformat-59.dll" that comes with FFmpeg?
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
919 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.