FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Check if the page called from HTTP or HTTPS
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Check if the page called from HTTP or HTTPS
Posted: Fri Jul 29, 2022 07:54 PM

Dear Antonio,
Can we check if a call is from http or https?
Best regards,
Otto

I need

TEMPLATE
<script>
document.write(document.location)
</script>
ENDTEXT

but in mod harbour.

So I thought to take AP_HeadersIN() Host-key and AP_FileName() and STRTAN() to change \/ and drive APACHE dir C:/www/htdocs to https://domain and rest from AP_filename()

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Check if the page called from HTTP or HTTPS
Posted: Sat Jul 30, 2022 02:22 AM

Dear Otto,

Please try checking AP_GetEnv( "HTTPS" )

best regards

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Check if the page called from HTTP or HTTPS
Posted: Sat Jul 30, 2022 07:20 AM

Dear Antonio, perfect!
Best regards,
Otto

Continue the discussion