473,836 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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+passwo rd into a form; page posts back to itself, then
calls my function for redirection to non secure pages:

redirectNoSSL(" myaccount.asp")

this executes
Response.Redire ct "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(sTarge t)
Dim host
Dim sUrl
Dim i
stripSSL=""
if sTarget="" Then Exit Function

sUrl=Request.Se rverVariables(" URL")
host=Request.Se rverVariables(" server_name") '
Request.ServerV ariables("HTTP_ HOST")

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

Function redirectNoSSL(s Url)
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>ServerVari ables(HTTPS)=" &
Request.ServerV ariables("HTTPS ") & "</BODY>"
Response.End
Else
Response.Redire ct sNewURL
End If
End Function
Nov 7 '08 #1
0 4356

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

Similar topics

5
4035
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 OTHER session variables are still intact !?! TIA, Larry Woods
3
14053
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 enter the absolute url like response.redirect("https://myProductionServer.com/SecurePage.aspx"), because when Im working in the development server I would have to change it back and forth everytime. Is there an easy way to do this without having...
0
1613
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 have the login page load in HTTP and then much like Hotmail does (if you look carefully) it redirects to an HTTPS link to authenticate and once successful, back to a standard HTTP link so that not every page has to be encrypted. My question is...
1
2259
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 to redirect to https://www.example.com (https) Exact error is:
5
3631
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 response.redirect I get a security warning when transitioning from https to http. Is there an accepted way to avoid having the user see this? Thanks.
2
4124
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 they come in on http. The site is also using an instant refresh on the index.htm page under root to www.waynesavings.com/aboutus/home.htm due to issues with the javascript menus used on the site. The code we're using on the custom 403 page is...
7
13454
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 checked require secure channel, require 128-bit encryption. In custom error, instead of using default message HTTP 403.4 - Forbidden: SSL required Internet Information Services in iishelp 403.4htm, I am trying to do redirect automatically. so I...
1
2615
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 response.redirect("https://myWebsite/SecuredPage.aspx") and it ran out well. But my problem is that I want to do this through the web.config file so that even if i want to secure full site or any particular page, I am able to do so at any time. Using the concept of switch...
2
3750
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 created page name can contain alphanumeric charecters including '_' (no white space) I am using this code to redirect the user created pages RewriteRule ^mypage/(.*)/ mypage.php?u=$1
0
9812
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9658
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10533
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10579
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10244
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7775
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5644
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5813
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4003
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.