Welcome to WebmasterWorld Guest from 54.159.44.227

Forum Moderators: ocean10000

Message Too Old, No Replies

Forcing http into https

     

infernofiasco

2:51 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



I have developed a cms backend where it uses https, but images / text that are relevant are in http so i keep getting "You are about to view unsecure items" is there a way of forcing the http items into https or a way of stopping this popup?

txbakers

4:35 pm on Dec 20, 2004 (gmt 0)

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member



move the images into the same directory.

The links for the images are outside of the https and are causing that.

also use relative paths.

infernofiasco

4:40 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



The images are relevant to the site which isnt https :(

How would i go about making the paths relevant?

infernofiasco

4:41 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



sorry i meant relative :)

txbakers

4:42 pm on Dec 20, 2004 (gmt 0)

WebmasterWorld Senior Member txbakers is a WebmasterWorld Top Contributor of All Time 10+ Year Member



maybe make two sets of images then? You need to make the https a self-contained unit.

infernofiasco

4:54 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



We are talkin about 1000s of packshots, which due to capacity couldnt be doubled. Is there an easy approach to relative paths?

dotme

9:38 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



Sorry - clarification. Two seperate sites, or two seperate *servers*?

Is it all physically on one machine?

tomasz

10:30 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



For images siting on the same server and sharing same certificate you can enforce to SSL but if you have two different directories/servers you need to get certificate

to enforce SSL
Private Sub EnforceSSL()
'localhost '
If LCase(Trim(Request.ServerVariables("SERVER_NAME"))) <> "localhost" Then
If Request.ServerVariables("SERVER_PORT") = 80 Then
'check if requested page requires SLL
Dim strSecureURL As String
strSecureURL = "https://"
strSecureURL = strSecureURL & Request.ServerVariables("SERVER_NAME")
strSecureURL = strSecureURL & Request.ServerVariables("URL")
strSecureURL = strSecureURL & "?" & Request.ServerVariables("QUERY_STRING")
Response.Redirect(strSecureURL)
End If

End If

End Sub
'
Private Sub NonSSL()
If Request.ServerVariables("SERVER_PORT") <> 80 Then
Dim strNonSSLURL As String
strNonSSLURL = "http://"
strNonSSLURL = strNonSSLURL & Request.ServerVariables("SERVER_NAME")
strNonSSLURL = strNonSSLURL & Request.ServerVariables("URL")
strNonSSLURL = strNonSSLURL & "?" & Request.ServerVariables("QUERY_STRING")
Response.Redirect(strNonSSLURL)
End If
End Sub

infernofiasco

9:02 am on Dec 21, 2004 (gmt 0)

10+ Year Member



Yes the images / site are on one physical machine!

I have will have a look at trying your code cheers :)

 

Featured Threads

Hot Threads This Week

Hot Threads This Month