Forum Moderators: phranque
I have been a long time visitor to WWW and have always found it to be THE best resource on the web of its kind. The subject of my first post has been puzzling me for a couple of weeks and I really don't know which route to take:
I currently use mod_rewite to strip PHP session data from links to make them nice and pretty for search engine bots, but I have wondered recently if a php route would be better? For example a script that checks for a bot and then runs/doesn't run sessions depending on the outcome.
On the one hand mod_rewrite is the quick way to do it, but it creates a lot of 301's because sessions are always started regardless. My first question is: Is this damgaging in any way?
Obviously with the php route a session would never be started so it seems a much cleaner method... but does this make it 'better', and is it worth me changing my tact with current and future sites in this regard?
Any opinions would be greatfully appreciated. :)
You might still want to keep the mod_rewrite code to fix up any straggler URLs already indexed by search spiders, and to implement a fast response to new crawler User-agent names not yet recognized by the script, but the better part of the job would be taken care of if the script would simply refrain from giving sessions to crawlers in the first place.
Jim
So a bot (and I'm thinking out loud here) would toddle along to my site, be recognsied by the script and be shown a nice session free site with session free urls. If however it came along checking an old link that included a session variable it would be bumped by the mod_rewrite to a 301 and then forwarded by the script to a session free page of links?
A mixture of both... what a good idea! Thanks again!