nginx下wordpress配置固定链接后404错误解决方案

nginx安装路径/conf/vhost/**.conf

中添加

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

  

posted on 2017-11-29 12:10  幼儿猿  阅读(193)  评论(0)    收藏  举报

导航