Forum Moderators: coopster
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