我的标题说明了一切。我尝试了以下方法,但它仅适用于非 https 版本。
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^ https://www.example.com/members/ [R=301,L]
最佳答案
尝试下面的规则,
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^ https://www.example.com/members/ [R=301,L]
关于.htaccess - htaccess 将 https ://www. example.net 重定向到 https ://www. example.com/members/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41983845/