Check if the page called from HTTP or HTTPS

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

Check if the page called from HTTP or HTTPS

Postby Otto » Fri Jul 29, 2022 7: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()
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm

Re: Check if the page called from HTTP or HTTPS

Postby Antonio Linares » Sat Jul 30, 2022 2:22 am

Dear Otto,

Please try checking AP_GetEnv( "HTTPS" )

best regards
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Check if the page called from HTTP or HTTPS

Postby Otto » Sat Jul 30, 2022 7:20 am

Dear Antonio, perfect!
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6329
Joined: Fri Oct 07, 2005 7:07 pm


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 8 guests