location / {
index index.html index.htm index.php;
#主要是这一段一定要确保存在
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
#结束
#autoindex on;
}
fastadmin Nginx 伪静态设置
于 2024-03-03 20:00:22 首次发布
本文详细描述了Apache服务器中如何使用.htaccess文件进行重定向,当请求的静态页面不存在时,自动重定向到index.php并传递参数。配置涉及`rewrite`规则和`autoindex`选项。
511

被折叠的 条评论
为什么被折叠?



