472,354 Members | 1,437 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 software developers and data experts.

Trying to Redirect from https to http (secure to non secure)

Hi,

I have a problem with a server side redirect from a secure page to a
non-secure page (same domain name, same folder)

I have added some test code that can display the target URL and that
containt http:// and yet it redirects to https://
example:

I am on
https://www.example.com/test/files/login.asp?Cmd=logout
enter username+password into a form; page posts back to itself, then
calls my function for redirection to non secure pages:

redirectNoSSL("myaccount.asp")

this executes
Response.Redirect "http://www.example.com/test/files/myaccount.asp"

but the browser goes to
https://www.example.com/test/files/myaccount.asp

Any ideas why this happens?

I suspect this has to do with a cookie that persists user/pwd info,
could that force the client to go to the Secure page?

thanks in advance
Axel

See my relevant code below:

Function stripSSL(sTarget)
Dim host
Dim sUrl
Dim i
stripSSL=""
if sTarget="" Then Exit Function

sUrl=Request.ServerVariables("URL")
host=Request.ServerVariables("server_name") '
Request.ServerVariables("HTTP_HOST")

sTarget=" & sTarget
i=InStrRev(sUrl, "/")
stripSSL= "http://" & host & Left(sUrl,i) & sTarget
End Function

Function redirectNoSSL(sUrl)
Dim sNewURL
sNewURL = stripSSL(sUrl)
If False Then ' Print link instead of redirect
Response.Write "<BODY>TEST: Redirect to stripSSL (" & sUrl & ") =
<a href=" & sNewURL & ">" & sNewURL & "</a>"
Response.Write "<BR>ServerVariables(HTTPS)=" &
Request.ServerVariables("HTTPS") & "</BODY>"
Response.End
Else
Response.Redirect sNewURL
End If
End Function
Nov 7 '08 #1
0 4257

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Larry Woods | last post by:
I am losing Session variables, but only those that are set in the page previous to a redirect to a secure page. Anyone seen ANY situation where Session variables just "disappear?" Note that...
3
by: Pooja Renukdas | last post by:
Hello, I have this web site where only two pages have to be secure pages and I need to call them using https, but since I have my development server and my production web server, I dont want to...
0
by: Jacob | last post by:
I would like to provide a login feature on my website that uses HTTPS/SSL. I've gotten all the certificates and have successfully done logins when the login page is secure. But I would prefer to...
1
by: E | last post by:
I have a login page that's https and after logging in should redirect to the home page http://www.example.com <form id="Form1" method="post" runat="server"> No matter what I've tried it tries...
5
by: Dabbler | last post by:
I'm sending users to a secure page https to fill out a registration form. When they're done I show a thank you page. I need to return the user to http mode after filling out the form. If I use...
2
by: Sergej Prokoviev | last post by:
We are running our site at www.waynesavings.com on secure hosting (Server 2003, IIS). We are using a custom 403.4 error page (called 403_4.asp, located under root) to redirect all users to https if...
7
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am trying to set this up using asp code and IIS configuration. But it seems not working. Here it is the way I am doing. In IIS I set up a virtual directory with secure communication, I...
1
by: kmithu | last post by:
I have a web site where I want to make the pages secures.ie. I want to redirect my pages to https.I have tried this doing so by making a self signed certificate and using...
2
by: RuthC | last post by:
Hi, In my website there is a facility for user to create there own pages we are maintaing this url as www.mywebsite.com/mypage/user created page name ex : www.mywebsite.com/mypage/ruth user...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made but the http to https rule only works for...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.