typecho伪静态去掉index.php
首先修改nginx配置;然后在后台配置typecho伪静态即可。
Nginx配置
server { listen 80; server_name yourdomain.com; root /www/yourdomain/; index index.html index.htm index.php; if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; } error_page 500 502 503 504 /50x.html; location ~ .*\.php(\/.*)*$ { #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini include fastcgi_params; fastcgi_intercept_errors on; fastcgi_pass unix:/run/php/php8.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; } }
- 后台配置typecho伪静态