0

这是我创建的 nginx.conf,

location / {
try_files $uri $uri/ /index.php?q=$request_uri&$args;
rewrite ^thumb/([^/]+)x([^/]+)/(.*) timthumb.php?src=http://$3&h=$2&w=$1 last;
}

但是,我收到错误 404 nginx,我必须做什么?谢谢

4

1 回答 1

0

好吧,我自己得到了答案

  location ~* \.(js|css|ico|wmv|3gp|avi|mpg|mpeg|mp4|flv|mp3|mid|wml|swf|pdf|doc|docx|ppt|pptx|zip)$ {
   expires max;
   log_not_found off;
   add_header Pragma public;
   add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location / {
rewrite ^/thumb/([0-9]+)x([0-9]+)_(.*) /timthumb.php?src=http://$3&h=$2&w=$1 last;
try_files $uri $uri/ /index.php?q=$request_uri&$args;
}
于 2015-07-31T01:11:07.543 回答