如果是你安装在网站根目录下:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
如果你是安装在:您的域名/ask/这样的目录下面,对应的配置文件分别为:
<IfModule mod_rewrite.c>
RewriteBase /ask/
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|jpg|ico|gif|jpeg|bmp|png|css)$ /ask/index.php
</IfModule>








![[原创]Linux环境下Nginx 通过upstream如何配置负载均衡以及实现_西数超哥博客](https://www.ysidc.top/wp-content/uploads/2018/12/76d2f7d9619b2f03a0b99d2b2b6e2dcd-480x300.jpg)



