Forum Moderators: Robert Charlton & goodroi
What do the experts here at WW say? Will this cause duplicates, or will it make the forum difficult to spider, or any other issues?
the folks over at the SMF forums say the 100% opposite(PHPSESSID won't hurt anything)..
i'm stuck in the middle not knowing who's right..
FWIW: there is apparantly NO way to turn off the SESSID's with the version of Apache that my host uses and they way they run PHP as CGI (or something)..
[myxyzsite.com...]
the 'id' portion may be mistaken for a session ID, and cause spiders to turn away.
1. In .htaccess add following lines:
#removing PHPSESSID from URL
php_value session.use_only_cookies 1
php_value session.use_trans_sid 0
You will stil use session IDs but they will not be vissible in URLs.
2.If you have URLs containing PHPSESSID already indexed, add to the .htaccess:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{QUERY_STRING} ^PHPSESSID=.*$
RewriteRule .* %{REQUEST_URI}? [R=301,L]
After appying this two thigs Now I have about 1300 indexed URLs containing PHPSESSID.
The only thing that still bothers me are URLs containing &PHPSESSID=... I tried:
RewriteCond %{QUERY_STRING} ^&?PHPSESSID=.*$
instead of
RewriteCond %{QUERY_STRING} ^PHPSESSID=.*$
but no success :(.
RewriteCond %{QUERY_STRING} ^&?PHPSESSID=.*$
That will only work if the PHPSESSID is at the start of the querystring though, I'd try it with the ampersand and without the question mark.
-Michael
Disallow: /*PHPSESSID
This will (over time) remove all PHPSESSID pages indexed by search engines. You should also invest some time in doing a google sitemap. In your sitemap.xml, only list URLs that do not contain PHPSESSIDs. This should speed up the process with google. Also in your google sitemaps account, you'll see in the Errors section: "URLs restricted by robots.txt". There you can see a very long list of the old PHPSESSID plagued URLs that will no longer be indexed. :)
All of the urls that should be indexed (but that were plagued by PHPSESSIDs) should get reindexed with the non-PHPSESSID url over time as well. That was my experience at least.
Hopefully i'll get more than just my index page in MSN/Google in a few days (well, days for MSN, weeks for G)
..