Php with mysql fetching path in url problem

Hi friends. i Know that google will not index pages which is having more
session ids and database ids if it is in our post(classified url) url. It
is true.

I am using “Osclass free classifieds script” for my new classified website.
It uses PHP and Mysql.

My problem is this script is not meets the seo rules. All the below
links(websites) are using the free script only. But they changed some thing
to achieve successful seo by showing pages into the form of direct links as
shown below(2nd part) without session ids and database ids. How to make
this…

Example:-

http://localhost/osclass/index.php?page=item&id=1 (this is testing in my
computer)

http://epageads.site11.com/index.php?page=item&id=2 (this not indexed in
google) … main website is indexed.

Good seo pages:-

http://www.classifieds-newyork.com/for-sale/animals/chickens-for-sale_1852(indexed in google.)

http://usa.onlinemela.com/classes/other-classes/online-training-on-it-software-technologies_410(indexed in google.)

my question is how to the above 2 websites achieved this. (all of them are
using osclass )…

I also want to implement to my website like the above 2 sites. please tell
me how to do it and what changes i have to make in mysql or in php code.

Please tell your valuable ideas with me. Thanks in advance.

Google does not care about your query strings, it will index those URLs just fine.

But the above 2 dirty urls are not indexed even their main domain name is indexed. Please solve this how to do this.