By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,366 Members | 1,775 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,366 IT Pros & Developers. It's quick & easy.

remove PHPSESSID from url (htaccess)

P: n/a
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!

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
frizzle,
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.
The ini value: session.use_only_cookies should = 1.
This way it will only use cookies no PHPSESSID in the url.
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


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
Jul 17 '05 #2

P: n/a
Mike Willbanks wrote:
frizzle,
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.


The ini value: session.use_only_cookies should = 1.
This way it will only use cookies no PHPSESSID in the url.


Hmm???
http://groups.google.com/gr*********...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/

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.