I use absolute URL's this would be my suggestion. I start with placing a constant called URLBase in a global file. EG:
1..create a file called global.asp, place this inside it (and and other useful things like database connection propeties etc....):
const URLBase = "http://localhost/Webapps/"
2..Include the file in all your pages
<form name="test" action="<%= URLBase %>login.asp">
Or you can enable parent paths and do something like (../ means go up a dir level):
<form name="test" action="../login.asp">
Wind is your friend