Remove id session php

Wed like to remove idsession from urls like

In our server the php is running as cgi so edit htaccess is unless.

have you tried ini_set()?

track7 - my dream-hosted site

id tried with

php_flag session.use_trans_sid off
php_flag session.use_only_cookies on

but this not work

session.use_trans_sid is the setting you need to change, but as you already stated, you can’t change it in .htaccess with php running as cgi.

ini_set() exists so that you can change php.ini settings in php code when you can’t do it via .htaccess or directly editing php.ini

track7 - my dream-hosted site

You actually can change it using htaccess and a custom php.ini and a simple shell script like this…

Your .htaccess

AddHandler php-cgi .php .htm 
Action php-cgi /cgi-bin/custom-php.cgi

Your /cgi-bin/custom-php.cgi

export PHPRC=/home/username/
exec /home/username/

Then in your php.ini

with ini_set

Custom php.ini tips and tricks

Ultimate Apache htaccess // htaccess Help Forum