nginx 在location 加入 :
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
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] 这个会导致No input file specified.
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>