typecho伪静态

nginx 配置.conf文件

if (-f $request_filename/index.html){
    rewrite (.*) $1/index.html break;
    }
if (-f $request_filename/index.php){
    rewrite (.*) $1/index.php;
    }
if (!-e $request_filename){
    rewrite (.*) /index.php;
    }

apache 配置.htaccess文件

<IfModule mod_rewrite.c>
  RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

</IfModule>
posted @ 2025-03-22 13:15  PlainText  阅读(65)  评论(0)    收藏  举报