htaccess伪静态规则转换Nginx

2024-11-11 08:32:52
推荐回答(1个)
回答1:

location / {

rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;

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

}