For the past year I used a PHP program that used session ids. I knew nothing of PHP at the time and only know a little more now. The script also used mod_rewrite to make URLs SE friendly. I have recently switched over to a non PHP script, keeping most of the same URLs by using mod_rewrite. However, in Google's index, most of the URLs have session ids attached to previously spidered pages (not to mention tons of scraper sites also). I don't know if this is normal or if it's due to a flaw in the PHP script. Regardless, tons of domain.com/page.html?PHPSESSID=long#sletters exist when they should only read as domain.com/page.html.
The links in Google still work but the unnecessary session id is added to the end of the URL. Is there a way to correct this or is there any need to worry? I had wanted to keep my pages in Google's index but now I'm thinking it wasn't such a good idea seeing the session ids attached. Would appreciate your comments.