## Redirection File

The Redirection file is a file that you create. It usually includes script to parse the query string sent by the AdRotator object and to redirect the user to the URL associated with the advertisement that the user clicked on. The QueryString that the AdRotator object passes to the Redirection File includes a variable called image that holds the image file, and a variable called url that holds the advertiser’s url.

You can also include script in the Redirection file to count the number of users that have clicked on a particular advertisement, and save this information to a file on the server.

###### Example

The following example stores some user information in Application variables and redirects the user to the advertiser's home page.

--- AdRedir.asp ---

    <%
       Application.Lock
       Application("LastAdClicked") = Request.QueryString("image")
       Application("LastUser") = Request.ServerVariables("REMOTE_ADDR")
       Application.UnLock
       Response.Redirect(Request.QueryString("url"))
    %>

© 1997-2001 Microsoft Corporation. All rights reserved.