修改.htaccess文件
判断UA并将搜索引擎定向到http,将一般访客定向到https
RewriteEngine On
# BEGIN Force SSL
RewriteCond %{HTTPS} !on [NC]
RewriteCond %{HTTP_USER_AGENT} !(baiduspider|googlebot|soso|bing|sogou|yahoo|sohu-search|yodao|robozilla|msnbot) [NC]
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,NC,L]
# END Force SSL