You wouldn't usually have the /xamp/ folder in the url either. Usually xamp will have a sub-folder for htdocs and you wouldn't include either in the url when browsing:
http://localhost/index.php would point to the same spot as C:/program files/xamp/htdocs/index.php