【发布时间】:2016-07-28 16:22:20
【问题描述】:
我目前在我的 htaccess 中使用它:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
但不幸的是,它将每次调用移动站点 (m.example.com) 重定向到主页。如何对 m.example.com 进行例外处理?我不知道如何正确设置 RewriteRule。
【问题讨论】:
标签: .htaccess redirect subdomain