View Single Post
  #8  
Old 11-29-2007, 01:45 PM
 
gkeraunen gkeraunen is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 37
 

Default Re: Seeing $_SERVER variables in home.php

OK, to use access the original Request URI via a cookie, I modified referer.php by adding the following code at the end. It worked for my 4.0.13 edition. Hope it helps someone.

Code:
# set a cookie that remembers the original request Added by Michael on 11-28-07 $request = $HTTP_SERVER_VARS["REQUEST_URI"]; x_session_register("request_session"); if (!isset($HTTP_COOKIE_VARS["RequestCookie"]) || empty($request_session)) { if(empty($request_session)) { $referer_session = (isset($HTTP_COOKIE_VARS["RequestCookie"])?$HTTP_COOKIE_VARS["RequestCookie"]:$request); } $request = $request_session; $_tmp = parse_url($current_location); setcookie("RequestCookie", $referer, time()+20*60, "/", $_tmp["host"]); }

-Michael
__________________
X-Cart 4.1.9
PHP 4.4.1
MySQL 4.0.27
Linux
Apache
Reply With Quote