Board logo

标题: [已解决] 新建站点 添加301转向 不能用,以前的可以 [打印本页]

作者: bluegua    时间: 2011-11-19 16:12     标题: 新建站点 添加301转向 不能用,以前的可以

本帖最后由 bluegua 于 2011-11-21 17:21 编辑

原来是我的域名解析有问题~
  1. server {
  2. listen 80;
  3. server_name www.aitpc.com;
  4. root /www/web/aitpc/public_html;
  5. index index.html index.php index.htm;
  6. error_page 404 /errpage/404.html;
  7. location ~ \.php$ {
  8. fastcgi_pass 127.0.0.1:9000;
  9. fastcgi_index index.php;
  10. include fcgi.conf;
  11. }
  12. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
  13. expires 1d;
  14. }
  15. location ~ .*\.(js|css)?$ {
  16. expires 12h;
  17. }
  18. }
  19. server {
  20. server_name aitpc.com;
  21. rewrite ^/(.*)$ http://www.aitpc.com$1 permanent;
  22. }
复制代码

作者: bluegua    时间: 2011-11-19 16:13

这是另一个,却可以用
  1. server {
  2.         listen       80;
  3. server_name www.htcwp.com;
  4.         root /www/web/weizhi/public_html;
  5.         index  index.html index.php index.htm;
  6.         error_page  404 /errpage/404.html;
  7.         location ~ \.php$ {
  8.                 fastcgi_pass   127.0.0.1:9000;
  9.                 fastcgi_index  index.php;
  10.                 include fcgi.conf;
  11.         }
  12.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
  13.                 expires      1d;
  14.         }
  15.         location ~ .*\.(js|css)?$ {
  16.                 expires      12h;
  17.         }
  18. }
  19. server {
  20.     server_name htcwp.com;
  21.     rewrite ^/(.*)$ http://www.htcwp.com$1 permanent;
  22. }        
复制代码





欢迎光临 WDlinux官方论坛 (http://wdlinux.cn/bbs/) Powered by Discuz! 7.2