Apache下:
打开(如果没有则新建).htaccess,粘贴进以下rewrite代码

<IfModule mod_rewrite.c>
    RewriteEngine On

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

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
  </IfModule>

Nginx下:
(待补充)

Last modification:June 6, 2017
如果觉得我的文章对你有用,请随意赞赏