301跳转(http跳转https不带www跳转到带www)

【301跳转(http跳转https不带www跳转到带www)】写在.htaccess中
一:http跳转https

RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=301,L]

二:不带www跳转到带www
RewriteCond %{http_host} ^ub07.com [NC] RewriteRule ^(.*)$ http://www.ub07.com/$1 [L,R=301]

三:带www跳转到不带www
RewriteCond %{http_host} ^www.jipinji.cn [NC] RewriteRule ^(.*)$ http://jipinji.cn/$1 [L,R=301]


    推荐阅读