HTTP referer disappears when I response.redirect


I am able to get the value for "request.ServerVariables("http_referer")". However, I try to use this value in a "response.redirect" and the value disappears. Why is this happening. Example:
-------------------------------------------------------------------------

If Not Session("whatEver") = True Then
Dim httpVar, EncodeHttpVar
httpVar = Request.ServerVariables("HTTP_REFERER")
EncodeHttpVar = Server.URLEncode(httpVar)

Response.Redirect "https://www.blah-blah/extranet/index.htmlreferer=" & EncodeHttpVar

End If

-------------------------------------------------------------------------

What am I doing wrong.
Posted On: Friday 26th of October 2012 07:35:28 AM Total Views:  516
View Complete with Replies

RELATED TOPICS OF ASP PROGRAMMING LANGUAGE




XMLhttp

I'm trying to use the XMLhttp object tpo return the status of a webpage.\tPart of the code I'm using is below:Set objhttp = Server.CreateObject ("Microsoft.XMLhttp")\t\t\t\t\tobjhttp.open "GET", strURL, False\t\t\t\t\tobjhttp.send\t\t\t\t\tsHTML=objhttp.statusText\t\t\t\t\tIf err or sHTML"OK" Then\t\t\t\t\t\t\tsTxt="FAILED"\t\t\t\t\tElse\t\t\t\t\t\t\tsTxt="ok"\t\t\t\t\tEnd if\t\t\t\t\tSet objhttp=nothing %>It works perfectly at home on my dial-up modem.\tOnly thing is I can't get this to work on my Work IIS server as all the reults come back saying Failed.\tI think this is due to a port restriction on our proxy server.\tDoes anyone know which port xmlhttp works on\tor another way to get around this
VIEWS ON THIS POST

217

Posted on:

Wednesday 17th October 2012
View Replies!

Need code to accept http post form field into XMLDOM

Need code to accept http post form field into XMLDOM.\tI also need the code to parse through it and get the data into a temporary recordset
VIEWS ON THIS POST

248

Posted on:

Wednesday 17th October 2012
View Replies!

Passing variables through links http://somepage.asp?[var]=something

I am new to ASP and I am not sure how to pass variableto another asp file and then use that info to populatethe other asp file.\tI have 2 files I am working with:players.aspplayer.asp (template for all players)I query a database for all playersNumber\tName1\t\t\t\tjoe blow2\t\t\t\tother guyI would like to have the names linked to the player.asp file and pass that players Number to the generic player.aspand query the database for all of that players info.Something like this:Number\tName1\t\t\t\t other guy I am not sure how to pass variables through links and thenbe able to use that variable to do another query to populatethe generic (player.asp) file
VIEWS ON THIS POST

244

Posted on:

Wednesday 17th October 2012
View Replies!

Show secure links in Address like https://

I have a site that uses frames.\tI have links to go to a Secure site to pay with a credit card. This of course does not show the https:// in the address and has some folks scared to buy cause they think its not secure.\tIf you right click on the page and click properties it does in fact show the real link\tand the https:// address.Is there a way to show this address in the Address bar in the Browser without giving up the frames. ORCant I open a new browser window some how just for the secure site linkBe specific.TIA DougP, MCP\tVisit my WEB site www.barcodeone.com to see how Bar-codes can help you be more productive
VIEWS ON THIS POST

332

Posted on:

Thursday 18th October 2012
View Replies!

Session variable persistenece and https

can anyone tell me whether or not session variables created within a site using the standard http protocol are retained and available to be used and referred to if you then view pages using the https protocol The site is the same, but I am unsure whether the action of going into the site using the secure protocol is seen as a new session. Derren[Mediocre talent - spread really thin]
VIEWS ON THIS POST

266

Posted on:

Sunday 21st October 2012
View Replies!

Problme in accessing request.servervariables("http_referer") on Mac

,\tI am using the Request.ServerVariables("HTTP_REFERER") as follows in "index.asp".'if instr(request.servervariables("http_referer"), "index.html") =0 or request("userid")="" then\tResponse.redirect "index.html"elseuserid=request("userid")It works fine on PC but doesn't work on Mac. I am getting correct values of "userid" so there\tmust be something wrong with request,servervariables("http_referer" )Does any body has any idea why it doesn't work on MacIs there some other reason whyRequest.ServerVariables("HTTP_REFERER") would return different informationfrom a Mac and IE5Waiting for reply
VIEWS ON THIS POST

249

Posted on:

Monday 22nd October 2012
View Replies!

Using https

I have set up a website with great security which I am confident cannot be compremised from the browser. However I am worried about the fact that my username/passwords are sent from browser to server through a form using conventional http. Has anyone used https to send usernames and passwords How east is it to do this Is it free or costly Basically I know this method exists but have no idea about how to go about using it.
VIEWS ON THIS POST

258

Posted on:

Monday 22nd October 2012
View Replies!

ASP http error 404

I'm having a very wierd problem with an ASP app. Some users are getting the HTTP 404 Error Cannot find file or web page etc. This is odd because 95% of users are fine. Has anybody got any suggestions
VIEWS ON THIS POST

358

Posted on:

Tuesday 23rd October 2012
View Replies!

How ca i catch errors on httpReq call

, I have the following code on a page on my site:- 'webServiceUrl = "zubair.***.com/gaia/gaia.cfcwsdl&method=logit&IP=" & userIPAddress & "&user_agent=" & user_agent & "&website=" & application("website") & "¤t_page=" & current_page & "&session_id=" & session_id & "&referer=" & referer Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP") httpReq.Open "GET", webServiceUrl, False httpReq.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1" httpReq.Send Basically the above code calls a webservice url and passes values to it. However i want to wrap it in a try catch so that if any errors occur it won't break the site. for instance if the url called by the webservice is unavailable it won'[t crash the site. Can anyone please tell me how to do this in classic asp
VIEWS ON THIS POST

282

Posted on:

Thursday 25th October 2012
View Replies!

Help please block spam using http referer?

I run a small mail order website. Over the past few months the website has been hit hard by form spam I think originating from a cached registration form as I have since added rules to the fields which have no effect. It wouldnt bother me but for the fact that each entry is automatically is iinput nput into the database which I am having to forever delete. Could anyone suggest a bit of HTTP REFFER code and where to put it in the following asp script so that only submitted forms from the site (originating host) are processed. (this was made by the web designers not me.. sorry its so long) I found this one: Code: Public Function CheckReferer() On Error Resume Next Dim strHost, strReferer, blnCheckReferer strHost = Request.ServerVariables("HTTP_HOST") strReferer = Request.ServerVariables("HTTP_REFERER") strReferer = Right(strReferer, Len(strReferer) - (InStr(1, strReferer, "://") + 2)) strReferer = Left(strReferer, InStr(1, strReferer, "/") - 1) If strReferer = strHost Then blnCheckReferer = True Else blnCheckReferer = False End If CheckReferer = blnCheckReferer End Function No idea if that would work or not, if it would where does it go in the below script THE SERVER SIDE CODE: (have to post over to pages its so long) Code: response.expires = -1 path_info = session("path_info") Set template = Server.CreateObject("ADODB.Connection") template.ConnectionTimeout = Session("Generic_ConnectionTimeout") template.CommandTimeout = Session("Generic_CommandTimeout") template.Open Session("Template_ConnectionString"), Session("Generic_RuntimeUserName"), Session("Generic_RuntimePassword") if len(tighten(request("action"))) = 0 then Response.Redirect("main.asp") end if 'Code by MC Public Aformnames(50) Public nooffields nooffields = 1 Aformnames(nooffields)="action" nooffields = 2 Aformnames(nooffields)="merchantemail" public redirectto redirectto = "" redirectto = trim(tighten(request("redirectto"))) WhatAction = trim(tighten(request("action"))) %>
VIEWS ON THIS POST

319

Posted on:

Friday 26th October 2012
View Replies!

To capture notice using xmlhttp

Necessary of aid to capture the notice of this site: http://www1.folha.uol.com.br/folha/emcimadahora/ using xmlhttp. In the Brazil I only obtained this code below, but he did not help me very. using xmlhttp. In the Brazil I only obtained this code below, but he did not help me very. Somebody has one codigo soon to help me to mount my pagina that goes to capture the news. codigo below is only for helping in the assembly that I need. Code:
VIEWS ON THIS POST

341

Posted on:

Friday 26th October 2012
View Replies!

Using #include and secure pages https

I want to use a secure server for the login page of my site. The login page would be reached like this: https://www.mypage.com/login.asp Inside the login.asp, I have included a config.asp and access.asp like this PHP Code: If the user was authenticated then I want to redirect them to http://www.mypage.com/main.asp (not https). Main.asp should now have 2 include statements at the top. PHP Code: Problem is that whenever I move from login.asp to main.asp, main.asp doesn't open (my guess is that config.asp was defined on the https server and not the http). Any suggestions on how to fix it. PS: the login and main pages work if i did all the work without the secure server.
VIEWS ON THIS POST

332

Posted on:

Friday 26th October 2012
View Replies!

Using internet for applications other then http pages

hey, I was hoping someone may knew what options I can have for applications (data0bound) like powerbuilder or access running on the internet, or even my own applications talking to for example a database, but not necessarily using the request response model traditionally on the internet\t have I explained myself properly\t
VIEWS ON THIS POST

326

Posted on:

Friday 26th October 2012
View Replies!

How to capture the string from third party through http?

I need to use a third party http to get a string back on ASP page. How do I capture the string What is the syntex
VIEWS ON THIS POST

245

Posted on:

Friday 26th October 2012
View Replies!

unable to contact webserver http://localhost

please help me out, I have IIS. I have interdev. whenever I am trying to contact the server..it shows what I have written in the title.
VIEWS ON THIS POST

357

Posted on:

Friday 26th October 2012
View Replies!

meta http-equiv=""Refresh""

Hi Guys, I would like to know why the following code does not refresh the contents of the top frame. Code: Response.write "" As error 500 appears - unable to locate URL - if I remove the TARGET reference - it works fine. Ideas \t Many
VIEWS ON THIS POST

235

Posted on:

Friday 26th October 2012
View Replies!

problem with http_referer!

hi people i wanted to monitor the traffic coming to my site. so i used http_referer tag to find the location from users are coming to my site. and i found a strange thing that i got only was able to trap a few referers and not all, and that too of a page of my site. i couldnt find any referer from any other site... i mean the field remain empty in my Database for most of the referers. i wondered why is it so is it related to any browser specific capability or problem hope to be answered soon.
VIEWS ON THIS POST

280

Posted on:

Friday 26th October 2012
View Replies!

URLs like http://www.pcworld.com/howto/article/0,aid,44543,00.asp

hey i'm new here. how r things i just wanted to understand how urls like http://www.pcworld.com/howto/article/0,aid,44543,00.asp is written i mean the number in the 0,aid,44543,00.asp. also my second question is how urls like www.whatever.com/39499w5886&/sjkjsk/tsh/ are written is this URL encryption and how is it done
VIEWS ON THIS POST

464

Posted on:

Friday 26th October 2012
View Replies!

meta http-equiv="Refresh" query ??

The following piece of code refreshes after 5 seconds and directs the browser to the new URL. Code: Response.Write "" What I would like it to do is close the window after 5 seconds instead of doing a redirection. Any Ideas would be appreciated. MTIA Darrin
VIEWS ON THIS POST

228

Posted on:

Friday 26th October 2012
View Replies!

When to use https

I'm working on an e-commerce site and we've just purchased a secure certificate to transmit a shopping cart to the payment gateway without fear of tampering. Question is, should the whole site be built on https:// or should only the form which posts to the payment gateway be secure If anyone can explain, I'd be most grateful,
VIEWS ON THIS POST

416

Posted on:

Friday 26th October 2012
View Replies!