wordpress修改固定链接后404
修改 nginx 配置文件 这个配置文件是你配置你网站站点的文件
比如我修改的就是blog.conf 这个文件
server {
listen 80;
server_name blog.onespot.website www.onespot.website onespot.website;
root /var/www/html/;
#index index.html index.htm index.php;
index index.html index.htm index.php default.html default.htm default.php;location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}location ~ .*\.(js|css)?$
{
expires 12h;
}location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
越努力越幸运