Fortunately there is a way to make the local site work like the live site does:
Check out XAMPP’s configuration and edit the virtual domain and the host file.