Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Stripping off ?PHPSESSID=694...

    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.

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.

  • #2
    New Coder
    Join Date
    Jan 2004
    Location
    UK
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    ==========================
    Find A Date Or Just Friends
    @ http://www.matesonline.co.uk ==========================

  • #3
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, I don't have access to php.ini. However, I figured something else out, and thought I'd share.

    PHP Code:
    // 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.

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •