随机失去会话变量只有在谷歌Chrome浏览器和URL重写 [英] Randomly Losing Session Variables Only In Google Chrome & URL Rewriting

查看:115
本文介绍了随机失去会话变量只有在谷歌Chrome浏览器和URL重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用谷歌Chrome,我貌似输球/网页间导航时损坏会话数据(PHP 5.0.4,阿帕奇2.0.54)。该网站工作完全正常在IE7 / 8,火狐,Safari浏览器和放大器;歌剧。问题是只与谷歌浏览器。

Using Google Chrome, I'm seemingly losing/corrupting session data when navigating between pages (PHP 5.0.4, Apache 2.0.54). The website works perfectly fine in IE7/8, Firefox, Safari & Opera. The issue is only with Google Chrome.

我收窄的问题。我使用的搜索友好的URL,并通过.htaccess文件隐藏我的前端控制器(index.php文件)。所以URL看起来像:www.domain.com/blah/blah/这里的.htaccess文件的内容:

I narrowed down the problem. I'm using search friendly URL's, and hiding my front controller (index.php) via a .htaccess file. So the URL looks like: www.domain.com/blah/blah/ Here's the .htaccess file contents:

Options +FollowSymlinks 
RewriteEngine on
#allow cool urls 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*) index.php [L] 
#allow to have Url without index.php 

如果我删除.htaccess文件,并暴露在URL前端控制器:www.domain.com/index.php/blah/blah/,Chrome的工作完全正常

If I remove the .htaccess file, and expose the front controller in the URL: www.domain.com/index.php/blah/blah/, Chrome works perfectly fine.

有什么想法想法?我想这是某种问题的Chrome如何识别哪些cookie的使用,发送到服务器?这发生在Chrome 4安培; 5.谢谢!

Any thoughts ideas? I'm thinking it's some kind of problem with how Chrome identifies what cookie to use and send to the server? This happens in Chrome 4 & 5. Thanks!

推荐答案

我有同样的问题,并修复它,我只需要创建的favicon.ico,并将其放置在根目录 - 否则我可以看到使用招了404导致此与来自Chrome的每一个页面请求(尽管我实际上没有链接到一个图标在页面标记)。

I had the same issue, and to fix it I only had to create a favicon.ico and place it in the webroot - otherwise I could see using Fiddler that a 404 resulted for this with every page request from Chrome (despite me not actually linking to a favicon in the page markup).

在我的脑海里这显然是在浏览器的错误,因为缺少一个图标的应该对会话数据没有露出。

In my mind this is clearly a bug in Chrome, as the lack of a favicon should have no baring on session data.

这篇关于随机失去会话变量只有在谷歌Chrome浏览器和URL重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆