Reply to Re: Control SSL error page or detect capable SSL connection?

Your name:

Reply:


Posted by Rich on 11/18/15 11:42

"Jan" <janoleolsen@hotmail.com> wrote in message
news:1141681474.213629.145370@j33g2000cwa.googlegroups.com...
> Is it possible to somehow redirect users to a cutom page if their
> browsers/firewall do not support SSL? Almost like a customized 404
> page?
>
> We'd like to offer SSL form submits by default, but show a special page
> if SSL is not possible for the user.

Hi Jan,

From my knowledge with IIS I know this is possible from a server-side point
of view, though you have to cheat somewhat.

Within IIS Manager, locate the file/folder you require to be SSL enabled,
then go into file security - secure communications - edit and then tick
enable 'Require secured channel (SSL)'. Now viewing this page over a HTTP
connection will generate a 403 error message. Off the top of my head I
don't think you can do any kind of detection with this, as the error message
is generated from IIS before any pages are executed. By default this 403
error message is a typical one that Microsoft ship with IIS, plain white
background with the error:

"The page must be viewed over a secure channel
The page you are trying to access is secured with Secure Sockets Layer
(SSL).
blah blah blah"

Now, to redirect the user, simply create your own custom 403 error page that
contains redirect code (I prefer to use meta refresh as it's cleaner) and
using the 'Custom Errors' tab within the previous options in IIS, set the
default 403 error page to your new one.

Voila. Once people try and access your page using a non-secure connection
they'll get redirected to this new page.

This may not be useful to you if you intend to pass session variables and
the like, I really haven't tested it in much detail with PHP, but it may be
of some use to you.

Hope this helps,
Rich.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация