Forum Moderators: open
classic ASP, right?
You need to look at the querystring in the servervariables collection. This is a sample that will just mirror the url typed in to access the url it is accessed at:
<%@ Language="VBScript" %>
<% Option Explicit %>
<%
Dim svKey, sv, sName, qString, fullURI, secure, hostName
Set sv = Request.ServerVariables
sName = sv("SCRIPT_NAME")
qString = sv("QUERY_STRING")
hostName = sv("SERVER_NAME")
If( sv("SERVER_PORT_SECURE") = 1) Then
secure = "https://"
Else
secure = "http://"
End If
fullURI = secure & hostName & sName
If(Len(qString) > 0) Then
fullURI = fullURI & "?" & qString
End If
Response.Write fullURI
%>
HTH,
-Mark
Sorry, I think I misunderstood your original request/question.
If you are trying to put an affiliate link with a querystring into the 'URL' querystring parameter of an existing url, then you will need to Server.URLEncode()
the 'affiliate link' you wish to redirect to.
so you would Server.URLEncode something.. say
[widgets.com...]
then the tracking link would be something like:
"/Track.asp?" & Server.URLEncode(url) & "&cat=789"
and this would turn out to be:
"/Track.asp?http%3a%2f%2fwww.example.com%2flandingPage.aspx%3fAffiliateID%3d123%26CategoryID%3d456&cat=789"
Make sense?
Mark
[edited by: Xoc at 12:13 am (utc) on Oct. 27, 2005]
[edit reason] changed to use example.com [/edit]