

项目根目录下(public下)新建命名为 nginx.htaccess 的文件,放入一下内容
if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; }
apache下htaccess配置
项目根目录下(public下)新建命名为 .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] </IfModule>
原文链接:https://tiehoo.com/403.html,转载请注明出处。