想要一个能把http的根域和二级域名www和https根域 跳转到https的www域名上。

囧死了,怎么百度都百度不出来。。好烦躁,求大神指点啊。

这个是本来的规则:

  • Options -Indexes
  • *
  • RewriteEngine On
  • RewriteBase /
  • - RewriteCond %{HTTPS} !=on
  • RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [L,R]
  • - RewriteRule ^(welcome(/index)?|index(\.php)?)/?$ / [L,R=301]
  • RewriteRule ^(.*)/index/?$ $1 [L,R=301]
  • - RewriteCond %{REQUEST_FILENAME} !-d
  • RewriteRule ^(.+)/$ $1 [L,R=301]
  • - RewriteCond %{REQUEST_URI} ^system.*
  • RewriteRule ^(.*)$ /index.php/$1
  • - RewriteCond %{REQUEST_FILENAME} !-f
  • RewriteCond %{REQUEST_FILENAME} !-d
  • RewriteRule ^(.*)$ index.php/$1
  • *
  • - *
  • ErrorDocument 404 /index.php
  • *复制代码