URL のクエリを介してサイトのモバイル バージョンにアクセスできるサイトがあります。
私が理解できないのは、モバイル ユーザーをこのバージョンに自動的にリダイレクトする方法です (現在、表示するには「?useformat=mobile」を追加する必要があります)。
これは私の現在のhtaccess設定です
RewriteEngine On
#MediaWiki short URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#Mobile - not working?
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^([^/]*)$ /index.php?useformat=mobile&title=$1 [L]
#HTTPS redirect (site uses HTTPS)
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
mod_rewrite は初めてで、以前はあまり使用されていませんでした。