Hey everyone,
I am currently changing the way my site works so it uses htaccess to redirect from absolute urls to longer more traditional ones (eg. mysite.com/help/5 rather than mysite.com/php/help/help.php?id=5 for example). This is so it's cleaner, search engines can find the data more easily and the pages are more memorable for the users (as they can have their own pages).
There is a user search function allowing search by things like sex, hair colour, location etc which obviously brings up links to multiple profiles that match the criteria. All profiles on the site are of the form mysite.com/username and subsections of their profiles are things like mysite.com/username/galleries or mysite.com/username/stats or mysite.com/username/contactme etc etc.
The thing i'm trying to decide is how to store the search data when you've navigated away from the search page? eg If i search for male users with black hair living in london and 3 come up, i click on the first one (user1). In order to retain the original search results i need to either:
a) open this up in another window leaving the existing search window open
b) pass the variables and decode them when returning to the search page, so links to profiles might be mysite.com/username/london/male/blackhair
c) store the search criteria in session variables so they don't need to be passed
the problem with a) is that it potentially means people are going to have huge numbers of pages open when they navigate to various different profiles and also those with popup blockers will experience problems
the problem with b) is it makes the url much more complicated and is only slightly better than having the absolute urls with the &s and ?s etc. It's not bad with only a couple of search criteria, but when using lots of different criteria it becomes a problem. Presumably i could mask the url variable in the address bar but i don't think this always works and i am always reticent to do that as it annoys me on sites.
i don't really know the problem with c)! but i've always been told to minmise the use of sessions variables as it causes overheads etc, but i'm not really sure of if that's true and if it's a good/bad idea. Ignoring that side of it, it would be a lovely transparent way of transferring the variables. What are your opinions on whether this is a good or bad way of doing it?
Personally i can't see any other way to do it but i'm guessing others who are more experienced than me have had this problem before and know which is the best way or another way. Thanks so much for your help, i really appreciate any thoughts that any of you guys have?
Dave