You need a way in your application to generate proper URLs from path.
You are never going to be a better programmer if you ignore the standards or let alone be aware you are breaking them. It works because browsers are sophisticated enough to figure out the proper URL, but what about wget...