Nginx下WordPress的重写配置

作者 : admin 于 2008-05-18 12:30:14 标签: , ,
2008
05-18

nginx居然不兼容apache的.htaccess文件,无奈在配置文件中修改.

server
{
listen  80;

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

server_name sunboyu.cn www.sunboyu.cn *.sunboyu.cn somecode.cn www.somecode.cn *.somecode.cn;
index   index.html index.htm index.php;
root    /***/;
access_log  /***/host.access.log;
}

这样即可

发表评论




XHTML:你可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(若看不到验证码,请重新加载页面。)