Currently, my workflow is to develop locally, and then place on remote server as key intervals. This has worked fine for a while, but since starting to do more AJAX work, I am finding it difficult to work with roots and hosts dynamically, and am having to write redundant code into my JS in order to make the same file work both locally and remotely.
Is there a good way to mimic a URL locally, or even just have each local site have a root level domain address (as apposed to localhost/my-dev-site) using MAMP?