How to do a redirect? - Posted (915 Views)
Senior Member
Astralis
Posts: 1218
1218
I've been using the following referal to do a modded redirect without problems (v. 3.4.03):
Code:

"<input name=""Refer"" type=""hidden"" value=""" &  Request.ServerVariables("HTTP_REFERER") & """>" & vbNewLine & _

But, the following code from (v. 3.4.04) is causing a problem:
Code:

"<input name=""Refer"" type=""hidden"" value=""" & GetReferer() & """>" & vbNewLine & _
This is the function:
Code:
function GetReferer()
Dim strReferer
strReferer = lcase(Request.ServerVariables("HTTP_REFERER"))
if strReferer = "" then
strReferer = "default.asp"
elseif (Left(strReferer, len(strForumURL)) <> lcase(strForumURL)) then
strReferer = "default.asp"
end if
GetReferer = strReferer
end function
This is my REFERER:
Code:
http://www.site.com/forum/post.asp?method=Topic&FORUM_ID=27&artid=1927&ref=
http://www.site.com/site/article.asp?id%3D1927 (I split this so it will fit on the page)
I understand that the function was added for security reasons and I'd like to keep that, but I'm not sure how to do it with my modified referer. Any advice?
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Support Moderator
Podge
Posts: 3776
3776
Not entirely sure what the problem is. I understand it to be that the referer you posted is "internal" and that strReferer should be set to default.asp in such cases? This line looks correct

elseif (Left(strReferer, len(strForumURL)) <> lcase(strForumURL)) then
unless strForumURL is not what you think it is

Can you response.write strForumURL and strReferer ? <
 
You Must enter a message