Assuming you are using Apache, you should instead use name-based virtual hosts <a href="http://httpd.apache.org/docs/2.2/vhosts/">http://httpd.apache.org/docs/2.2/vhosts/</a><div><br></div><div>That way you can have</div><div>
<br></div><div><a href="http://demo.localhost">http://demo.localhost</a><br clear="all"><div><a href="http://production.localhost">http://production.localhost</a></div><div><br></div><div>and the paths will be preserved.</div>
<div><br></div><font color="#333333">Carl Wiedemann</font><div><div><font color="#333333">Website design and development consulting</font></div><div><font color="#333333"><a href="mailto:carl.wiedemann@gmail.com" target="_blank">carl.wiedemann@gmail.com</a> | skype: c4rlww</font></div>
</div><br><br></div>