|
发表于 2018-1-24 16:19:30
|
显示全部楼层
-------- nginx.conf 配置例子如下: -----------------------------------------
location / {
root html/xxx;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?$1 last;
break;
}
}
-------- .htaccess 文件内容(web根目录下): -----------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule> |
|