用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1937|回复: 1
收起左侧

[讨论/交流] 关于rewrite造成微信分享404页面问题

[复制链接]
发表于 2015-12-8 18:15:00 | 显示全部楼层 |阅读模式
今日发现微信分享的时候,会给分享链接带上?from=timeline&isappinstalled=0   造成分享的页面全部404问题。
比如我打开http://www.abc.com?from=timeline&isappinstalled=0  会报404问题。而正常网站都可以访问,比如
http://www.baidu.com?from=timeline&isappinstalled=0  是可以正常访问的。

附带我的nginx conf配置。请大神帮找下病症我的rewrite哪里出问题了。

不想有广告嫌疑,故把域名用abc.com代替了

server
    {
        listen 80;
        server_name www.abc.com abc.com;
        index index.php index.html index.htm home.php default.html default.htm default.php;
        root  /home/wwwroot/abc.com;
        if ( $host ~ "^abc\.com$") {
                  rewrite ^/(.*) http://www.abc.com/$1 permanent;
              }

     location /
     {

         if ($request_uri ~* ^/system)
         {
             rewrite ^/$ /index.php?/$1 last;
             break;
         }
     
     
         if (!-e $request_filename)
         {
             rewrite ^/$ /index.php?/$1 last;
             break;
         }
     
   
         error_page 404 /index.php;
     
  
         location ~ /\.ht
         {
             deny all;
         }
     
        
      
                 location ~ [^/]\.php(/|$)
        {
            # comment try_files $uri =404; to enable pathinfo
            try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            #include pathinfo.conf;
        }
               

         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
         {
             if (-f $request_filename) {
                 expires      30d;
                 break;
             }
         }
     
         location ~ .*\.(js|css)?$
         {
            if (-f $request_filename) {
                 expires      12h;
                 break;
             }
         }

     }

}
 楼主| 发表于 2015-12-8 21:33:26 | 显示全部楼层
没人清晰这个问题吗?

本版积分规则