- ASP - Server Variables
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·What's New?
Mail List


Referring Page Source
Stop bad input before it gets into your applications. Typically, form actions to your applications should only come from your server. You take time to develop your applications to handle input data in a very specific way whether by checking input on the client side or on the server side, but where is all the input coming from? By calling and splitting the http_referer server variable by / and the http_host server variable you can compare the host of the previous page to your host. The following example will redirect all activity without a referring page to All referring pages that have a host other than or will be sent to Because the demonstration is opened from a link from it will display a message stating the referring page was a valid one.
View the Output
Text View
Print View
Mail this Link
Download the Code

dim u_file,g_file

' Get the address of the referring page
u_file = request.servervariables("http_referer") 

' If there is no referring page then redirect to
if u_file = "" then
response.redirect ""
end if

' If there is a referring page then check where it cam from

' Split the referring url by /
' a typical address will split like this
' g_file(0)=http:
' g_file(1)=
' g_file(2) or
' g_file(3)=Any further subdirectories off the root directory in the request

' Compare the host name to the host of the referring page
if (trim(g_file(2) <> request.servervariables("http_host"))) then
response.write g_file(2)
response.redirect ""
else %>

<title> (Referring Page Source)</title>
<body bgcolor="#FFFFFF">
Vaid Request from server
<% end if %>




ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3