Apache下.htaccess跳转https且无www

Modified on: Fri, 27 Oct 2017 16:46:00 +0800

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^oiplay.com$ [NC]
RewriteRule ^(.*)$ http://oiplay.com/$1 [L,R=301]

RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_HOST} ^oiplay.com
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

评论已关闭