nginx
server { listen 192.168.1.111:80; server_name test.com; rewrite ^(.*)$ https://$host$1 permanent; }


apache .htaccess
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]


#自动跳转到https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</IfModule>
 

相关文章:

  • 2022-12-23
  • 2021-07-31
  • 2021-09-12
  • 2021-06-18
  • 2022-12-23
  • 2021-07-31
  • 2021-12-01
  • 2022-01-31
猜你喜欢
  • 2022-01-31
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2021-07-18
相关资源
相似解决方案