php站点伪静态配置(Apache+Linux)

404报错

404 Not Found

nginx/1.15.11


问题解决

1、Linux

location / {

if (!-e $request_filename) {

rewrite ^(.*) /index.php?s=/1 last;

}

}

2、Apache

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*) index.php?s=/1 [QSA,PT,L]

</IfModule>

相关推荐
思茂信息1 小时前
CST交叉cable的串扰(crosstalk)仿真
服务器·开发语言·人工智能·php·cst
weixin_449173652 小时前
Linux -- 项目中查找日志的常用Linux命令
linux·运维·服务器
想唱rap3 小时前
C++智能指针
linux·jvm·数据结构·c++·mysql·ubuntu·bash
Strugglingler3 小时前
基于whiptail开发shell导航工具
linux·shell·ui设计·whiptail
艾醒(AiXing-w)3 小时前
Linux系统管理(二十)——Linux root磁盘不足?一站式应急清理方案(亲测可用)
linux·运维·服务器
小义_4 小时前
【Kubernetes】(五) pod2
linux·云原生·容器·kubernetes
哇哦9824 小时前
渗透安全(渗透防御)②
linux·安全·渗透防御
chao_6666665 小时前
AI coding 代码开发规范
linux·运维·服务器
xiaobangsky5 小时前
Linux SMB/CIFS 网络挂载配置指南
linux·运维·网络
wang09075 小时前
Linux性能优化之内存管理基础知识
java·linux·性能优化