...

View Full Version : Stripping off ?PHPSESSID=694...



Skyzyx
01-30-2004, 12:35 AM
I'm using a visitor counter that utilizes PHP sessions. Unfortunately, I end up with URL's looking like this:


http://www.skyzyx.com/?PHPSESSID=694fb84fa38212a97cb7e608bcca8ecc


My web host uses Red Hat 7.3, with Apache 1.3.x. Is there any way to modify my .htaccess file to automatically strip off this extraneous text, while still have my counter continue to work?

Any help is appreciated. :D

sitami
01-30-2004, 11:53 AM
its in your PHP.ini file

search the file for sessions

then scroll down until you see
url_rewriter.tags =


you can then if you want remove a href=


at least i think its that

hope that helps

Skyzyx
02-03-2004, 11:56 PM
Well, I don't have access to php.ini. However, I figured something else out, and thought I'd share.



// Remove the ?PHPSESSID from all pages.
$uri = $_SERVER["REQUEST_URI"];
$fixurl = stristr($uri, '?phpsessid=');

if ($fixurl) {
print('<meta http-equiv="refresh" content="0; url=http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REDIRECT_URL'] . '">');
}


Hope this helps someone else. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum