title: response redirect previous page classic asp
body: <p>I want to go back one of several possible pages if the captcha was entered incorrectly on the referring page. This is what I am trying and it just bypasses the redirect when there is an error and takes them to the success page. If I put in   response.redirect("somepage.asp") it works no problem but i need it to handle multiple page referers</p>
  
  <pre><code>Call ValidateCAPTCHA()
  If m_CAPTCHAPASS&lt;&gt;1 then
  Session("ValidCAPTCHA")="false"
  Dim redirectpage
  redirectpage = Request.ServerVariables("HTTP_REFERER") &amp; "e=1" 
  Session("FirstName")=Request.Form("First_Name")
  Session("Phone")=Request.Form("Phone")
  Session("EMail")=Request.Form("EMail")
  Session("Comments")=Request.Form("Comments")
  response.redirect(Request.redirectpage)
  end if
  'send email script follows
  </code></pre>