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

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


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

01-30-2004, 12:53 PM
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

02-04-2004, 12:56 AM
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.
$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: