[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Detect SSL or Non-SSL
At 07:50 PM 4/24/2002 -0700, you wrote:
>Using IC tags is there a way to detect if the page has been served in
>SSL or non-ssl mode? With javascript you can do:
>
>if (document.location.protocol == "http:")
>
>But I would like to avoid using javascript if possible. Thanks!
>
>-Ron
If you use my [env] usertag (search the archives for the source code if you
do not already have it in VENDROOT/usertag), you can use it to get the port
number of the http request, to whit:
[tmp server_port][env SERVER_PORT][/tmp]
[if scratch server_port == 80]
Regular old http session
[elsif scratch server_port == 443]
Secure http session
[/elsif]
[/if]
Unless your web server is configured in some non-standard way, this will
work, otherwise you may have to adjust the numbers a bit.
- Ed L.
===============================================================
New Media E.M.S. Software Solutions for Business
463 Main St., Suite D eCommerce | Consulting | Hosting
Placerville, CA 95667 edl@newmediaems.com
(530) 622-9421 http://www.newmediaems.com
(866) 519-4680 Toll-Free (530) 622-9426 Fax
===============================================================