Forum Moderators: coopster

Message Too Old, No Replies

Help with sessions and trans_sid

using trans_sid properly for functionality

         

nquinn

5:07 pm on Dec 9, 2003 (gmt 0)

10+ Year Member



Hi,

Like many of you out there, I am attempting to allow my dynamic site to be indexable by Google. Before I get into my questions, let me give you the basic layout of my pages:

All products are currently shown with this link:

[domain.com...]

In addition, I have used mod_rewrite in my htaccess to create some 'static' pages that map:

domain.com/pid/xxxxxx -> showitem.php?pid=xxxxxx

I now have some questions:

(1) On my server, &PHPSESSID is being appended to all of my URL's, which is stopping google from indexing the site. I disabled trans_sid, but this seems to have broken the shopping cart for almost all users. What is the proper way to disable trans_sid and ENABLE cookies to work properly?
In my cart orders are sent to a 'temporder' table. I am simply inserting the session id by calling the variable $phpsessid.

Should I be calling this a different way? Do I need to read a cookie? Do I need to initialize cookies in a certain way after setting session_start()? Any clarification would be helpful.

(2) When I remapped domain.com/pid/xxxxxx to my showitem.php?pid=xxxxxxx thing, it linked the page fine, BUT, all of the normal links were broken because they were now pointing to domain.com/pid/link rather than domain.com/link. Must I use absolute links? I thought mod_rewrite would be smart enough to handle this. Below is my htaccess file code for rewriting the url:

-----------
RewriteEngine on
RewriteBase /

RewriteRule ^pid\/(.*) /showitem.php?pid=$1
------------

example: my link to src="pics/blah.jpg" now became [mydomain.com...] rather than just [mydomain.com...]

Thanks in advance,

Neil

stargeek

11:12 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



there are a few ways to disable session.trans_sid;
first note that you cannot do this at runtime with ini_set, you must either do it globally in php.ini by changing the value to 0, or you can use php_flag in .htaccess or httd.conf to disable this feature.
Doing php seo i run into this problem constantly and this is the best solution i have found.

figment88

11:18 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



yes, all of my .htaccess files include the line
php_value session.use_trans_sid 0