|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Search Engine Friendly URLs / Shopping Cart Problem...
I'm all outa ideas, hopefully someone here has something that can help me. I wanted to build a PHP shopping cart, and website that would be driven by MySQL. So I got everything working pretty well for the most part, even using Search Engine Friendly URLs ( ie no query strings )
So my URLs look like this: href="index.php/user/2398525" Or somethign similar, where 2398525 is a randomly assigned UserID which gets passed to every page through the URL. The problem I thought of, is that when search engines index my pages, they will be indexing whatever UserID they have, and then when people find my pages in search engines, everyone that comes from the search engine will have the same UserID... ie they will all be going to index.php/user/[whatever userid the search engine had when it spidered website] Which means that a lot of users could end up with the same UserID... which could cause problems in people putting things in others shopping carts and such... Can anyone think of a way to get around this? To fix this? If I could tell it was a search engine, I could just not use a UserID for it... anyway to do this? Thanks! |
|
#2
|
|||
|
|||
|
RE: Search Engine Friendly URLs / Shopping Cart Problem...
You could track the userids in a database and then expire them after a certain period of time. If the id doesn't exist in the database, then assign a new one....
|
|
#3
|
|||
|
|||
|
RE: Search Engine Friendly URLs / Shopping Cart Problem...
imho you shouldn't pass user id in the url. instead, u should put in the url only "navigational" and "action" variables.
what do i mean by these? well, for a example, look at this forum. all variables that are there surve navigational or action purpuse. ie, when i am writing this post, url looks like this: http://codewalkers.com/forum/index.php?action=reply&forum=phpcoding&id=894&realm=default in it, "action" var shows what i am doing on this page. "forum" var shows a forum where i am posting, "id" contains post id to what i am replaying... your user id, and similar stuff that difer from user to user should be passed in a cookie, or saved within a session... |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > Search Engine Friendly URLs / Shopping Cart Problem... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|