PDA

View Full Version : How to remove PHPSESSID from URLs?



paul321
03-26-2008, 04:19 AM
Hello,

I'm using the Tectic PHP form mail script on my site. When the form is filled and I press the Submit button, I am redirected to the correct page, but there is an unwanted PHPSESSID string that is added to the end of the URL.

I searched the web for a resolution to this and it requires editing the .htaccess file and including the following two lines of code:



php_value session.use_trans_sid 0
php_value session.use_only_cookies 1


However, when I include this in my .htaccess file, the web server no longer works and I get a configuration error. :confused:

Does anyone know how to do this right? I simply want the SESSID to stop appearing. Thank you very much for any help.

Paul

shadmego
03-26-2008, 09:42 AM
You will have to modify the script to use $_POST instead of $_GET. If I were you, and this were extremely important, I would contact the developer and ask about it. If they can't or won't fix it, then stop using the script.

If it's not that important, then I would not worry too much about it.

~regards,and welcome to the community!

RDM
03-26-2008, 09:49 AM
Use this when starting a session



ini_set('url_rewriter.tags','');
session_start ();
header('Cache-control: private');


The problem with this, is if the person has cookies disabled, then the session won't work properly.