Connecting Tech Pros Worldwide Forums | Help | Site Map

remove PHPSESSID from url (htaccess)

frizzle
Guest
 
Posts: n/a
#1: Jul 17 '05
Hi there
I have a site in which all pages ARE php-pages, but
they're called/manipulated with htaccess.

All files appear as a html-file to surfers.
Sometimes i get the PHPSESSID declared in the url.
I want to avoid this from caching in the browsers
history.

is there a way to detect if PHPSESSID is set, and if
so redirect the user...

RewriteRule ^(.*)?(\?)?(\&)?PHPSESSID=([a-zA-Z0-9]+)?$ index\.php\?$1

doesn't work.. :(

i can't find a good way to get what i want..
can someone help me?

Thanks!


Mike Willbanks
Guest
 
Posts: n/a
#2: Jul 17 '05

re: remove PHPSESSID from url (htaccess)


frizzle,
[color=blue]
> All files appear as a html-file to surfers.
> Sometimes i get the PHPSESSID declared in the url.
> I want to avoid this from caching in the browsers
> history.[/color]

The ini value: session.use_only_cookies should = 1.
This way it will only use cookies no PHPSESSID in the url.
[color=blue]
> is there a way to detect if PHPSESSID is set, and if
> so redirect the user...
>
> RewriteRule ^(.*)?(\?)?(\&)?PHPSESSID=([a-zA-Z0-9]+)?$ index\.php\?$1[/color]

If you are using sessions you do not want to ripout the session url.
Now the backside to this whole thing is if the browser does not accept
cookies then you will not be able to monitor there session data as they
will need to always relogin or have a new session every page.

Mike
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
#3: Jul 17 '05

re: remove PHPSESSID from url (htaccess)


Mike Willbanks wrote:[color=blue]
> frizzle,
>[color=green]
> > All files appear as a html-file to surfers.
> > Sometimes i get the PHPSESSID declared in the url.
> > I want to avoid this from caching in the browsers
> > history.[/color]
>
> The ini value: session.use_only_cookies should = 1.
> This way it will only use cookies no PHPSESSID in the url.[/color]

Hmm???
http://groups.google.com/groups?as_u...oglegroups.com

( or
http://groups-beta.google.com/group/...24f27f2b7ac610)

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Closed Thread


Similar PHP bytes