php last directory in REQUEST_URI stored in session replaced with "none" in IE
I am storing the $_SERVER['REQUEST_URI']
in the session. $_SESSION['PROPERTY_SEARCH_REQUEST_URL']
like so
$sessName='BHSID';
$sessSecure=false;
$sessHttponly=false;
$sessLifetime=3600;
$sessPath='/';
$sessDomain='my.domain.com';
session_name($sessName);
session_id();
session_set_cookie_params(time() + $sessLifetime, $sessPath, $sessDomain, $sessSecure, $sessHttponly);
ini_set('session.use_trans_sid', false);
ini_set("url_rewriter.tags","");
session_start();
$_SESSION['PROPERTY_SEARCH_REQUEST_URL']=$_SERVER['REQUEST_URI'];
<rest of code>
Lets say the url is http://www.domain.com/en/search
. I can print_r($_SESSION['PROPERTY_SEARCH_REQUEST_URL'])
at the end of that page as /en/search
. So far so good.
However, if I go to any other page after that and do print_r($_SESSION['PROPERTY_SEARCH_REQUEST_URL'])
at the top of that page (after session start of course), I get /en/none
i.e the last (mod_rewrite)"directory" gets replaced with none
.
This however happe开发者_运维技巧ns only on IE. Chrome, Safari, FF, etc. are all fine . It's only ever the last bit that gets replaced (i.e /en/search/something/or/another
would get replaced with
/en/search/something/or/none
, etc.)
Any ideas anyone ?
PS: this happens on WAMP and LAMP setup.
In case it happens to anyone else. The problem appears not to have been the css or mod_rewrite, but the border-radius.htc file (as i was trying to have rounded corners in IE) which appear to write all sorts of nonsense to the session. (the session file without it was about 2k, with the .htc it ended up quering the db for no apparent reason and filling the session with 1.8 MB! of data....go figure. I dunno .
i would vote down my above answer , but dont seem to be able to.oh well.
精彩评论