nginx下的wordpress固定连接
- 遍地阳光2009-11-01高级会员1052
这个是主机配置文件
server
{
listen 80;
server_name www.abc.com;
index index.html index.htm index.php;
root /web/www/abc;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}www.adc.com是域名,在abc.com/blog下有个博客是wordpress的,
找到的wordpress在nginx下的规则是location / {
index index.html index.htm index.php;root /home/www/abc/blog;
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;
}
}红体字那部分写的对吗?