wordpress redirect error in xampp

It’s because your new copy of the site localhost/mylisting is still hooked into same database as localhost/listing.

So to avoid that, you have to point your new installation to a different database. to do that, goto your phpmyadmin and export your current db, then create new empty db and import into it. then goto newly imported db’s wp-options table. change siteURL and homepage URL to localhost/mylisting from localhost/listing.