以下是代码

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

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
  #301重定向
  RewriteCond %{HTTPS} off
  RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>


如果您觉得此文章可以帮得到你,可以打赏作者!!

打赏作者

标签: 301, 301重定向, htaccess, htaccess重定向