Instead of using the host method, try searching for a certain pattern in your url. Use the code below as it is modified from yours:
Dim strCurrentUrl = Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("SCRIPT_NAME")
'If you need the querystring as well, use the line below
'Dim strCurrentUrl = Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("SCRIPT_NAME") & Request.ServerVariables("QUERY_STRING")
if InStr(1, strCurrentUrl, "payment", vbTextCompare) > 0 then
response.redirect("/ylhl/payment/index.html")
elseif InStr(1, strCurrentUrl, "willamettevalleycrane", vbTextCompare) > 0 then
'Unless you absolutely need `http://www.willamettevalleycrane.com` in your redirect, use the below line. This assumes that willamettevalleycrane.com is the current website you're on.
response.redirect("/wvc/index.html")
else
Else, the reason why it is not direction is due to the following errors:
1. It will always detect willamettevalleycrane.com in your host even if it has payment along with it. If you want to keep your coding, switch the first if statement with the second so it detects the payment first.
2. HTTP_HOST will only return the current host as willamettevalleycrane.com. URL returns the remaining version like /payment.asp or what not.
3. Your second if statement is followed by an unclosed first (if ... then ... if) instead of (if ... then ... end if) or (if ... then ... elseif ... end if). Make the second if statement into elseif unless you close the first if statement with an end if. If you wish to keep your following code, then use this fixed version:
<%
EnableSessionState=False
Dim host = Request.ServerVariables("HTTP_HOST")
Dim url = Request.ServerVariables("SCRIPT_NAME")
'or if you prefer the below method. Both give same results.
'Dim url = Request.ServerVariables("URL")
if (host & url) = "willamettevalleycrane/payment" or (host & url)= "www.willamettevalleycrane.com/payment" then
response.redirect("http://www.willamettevalleycrane.com/ylhl/payment/index.html")
elseif host = "willamettevalleycrane.com" or host = "www.willamettevalleycrane.com" then
response.redirect("http://www.willamettevalleycrane.com/wvc/index.html")
end if
%>
I highly suggest using my first example. Less room for error especially in typo's int he address bar.