ssl域名做301的方法:
在apache環境下,新建一個.htaccess文件,添加以下代碼,將.htaccess文件放在網站根目錄即可,代碼如下:
#將https訪問301重定向至httpRewriteEngine onRewriteBase /RewriteCond %{SERVER_PORT} !^80$RewriteRule ^.*$ http://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
#將https訪問301重定向至http
RewriteEngine on
RewriteBase /
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^.*$ http://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]