403.4 won't redirect in IE7
Posted
by Jeremy Morgan
on Server Fault
See other posts from Server Fault
or by Jeremy Morgan
Published on 2010-03-24T22:40:57Z
Indexed on
2010/03/24
22:43 UTC
Read the original article
Hit count: 368
I have a secured folder that requires SSL. I have set it up in IIS(6) to require SSL. We don't want the visitors to be greeted with the "must be secure connection" error, so I have modified the 403.4 error page to contain the following:
function redirectToHttps() { var httpURL = window.location.hostname+window.location.pathname; var httpsURL = "https://" + httpURL ; window.location = httpsURL ; } redirectToHttps();And this solution works great for every browser, but IE7. On any other browser, if you type in http://www.mysite.com/securedfolder it will automatically redirect you to https://www.mysite.com/securedfolder with no message or anything (the intended action). But in Internet Explorer 7 ONLY it will bring up a page that says
The website declined to show this webpage
Most Likely Causes:
This website requires you to log in
This is something we don't want of course. I have verified that javascript is enabled, and the security settings have no effect, even when I set them to the lowest level I get the same error.
I'm wondering, has anyone else seen this before?
© Server Fault or respective owner