typecho Apache 开启伪静态

发布时间 2023-09-14 10:06:23作者: modys

数据恢复后伪静态开启遇到问题,BD、GG了很久才找到解决办法,如下:

1、Nginx

if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}

对应配置文件中。

2、Apache

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

丢到网站根目录.htaccess文件中生效。

 

 

摘自:http://www.zifu.ltd/typecho-apache-opens-pseudo-static.html