×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Sub-folder does not show green padlock

Sub-folder does not show green padlock

Sub-folder does not show green padlock

(OP)
Hello colleagues!

I have a valid SSL Certificate for a domain www.masstec.com.br. When this website address is typed the green locker appears. It is ok.

But when typed www.masstec.com.br/receitas, the page is loaded but the green padlock does not appear in the address bar. I have already changed all HTTP to HTTPS in the HTML index.htm file inside the sub-folder.

What is missing?

Please see the image.



Thank you,
SitesMasstec

RE: Sub-folder does not show green padlock

The page probably requests other items/elements that are NOT served via HTTPS.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: Sub-folder does not show green padlock

(OP)
Hello Chris!

I have already changed all references http:// to https://

Please see my other image illustrating the problem:
(I have SSL certificate for the main domain www.masstec.com.br)

Thank you,
SitesMasstec

RE: Sub-folder does not show green padlock

what is the FULL code of the redirect, given that without that this ISN'T an ASP problem just a browser issue.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: Sub-folder does not show green padlock

(OP)
Hello Chris!

Please note that the Microsoft IIS server (where my sites are hosted) is NOT defined as an HTTPS server, because I have only one SSL certificate, for the masstec.com.br domain.

The photogaleria.com.br domain is in the same sarver, but it has NOT an SSL certificate.


This is the full code of the DEFAULT.ASP file:

CODE -->

<HTML>

<HEAD>
<link rel="shortcut icon" href="favicon.ico" >
<!--link rel="icon" href="animated_favicon.gif" type="image/gif" -->
<TITLE>Redirect</TITLE>
</HEAD>

<BODY>


<% 
URL = Request.ServerVariables("SERVER_NAME") 

Select Case URL 

Case "www.masstec.com.br" 
Response.Redirect "https://www.masstec.com.br/masstec/" 
Case "masstec.com.br" 
Response.Redirect "https://masstec.com.br/masstec/" 

Case "www.masstec.com.br/receitas" 
Response.Redirect "https://www.masstec.com.br/receitas/" 
Case "masstec.com.br/receitas" 
Response.Redirect "https://masstec.com.br/receitas/" 


Case "www.photogaleria.com.br" 
Response.Redirect "/photogaleria/" 
Case "photogaleria.com.br" 
Response.Redirect "/photogaleria/" 

End Select 
%>  


</BODY>
</HTML> 

Thank you,
SitesMasstec

RE: Sub-folder does not show green padlock

Right, so you DO NOT check for https BEFORE redirecting but just redirect to https in all cases and THAT is the problem.


CODE --> ASP

<%
   If Request.ServerVariables("SERVER_PORT")=80 Then
      Dim SSL_URI
      SSL_URI = "https://"
      SSL_URI = SSL_URI & Request.ServerVariables("SERVER_NAME")
      SSL_URI = SSL_URI & Request.ServerVariables("URL")
      Response.Redirect SSL_URI
   End If
%> 

Should solve the problem. Save it to a file and include at the start of every ASP file.

You can also insert a conditional check and insert for 'www' as required.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

RE: Sub-folder does not show green padlock

(OP)
Hello Chris!

I saved the code you sent to the PARAHTTPS.ASP file, and saved it in the root directory of the Server.

Then I put in the first line of the DEFAULT.ASP file (which treats the redirections, also in the root directory of the Server) the following code:

CODE -->

<!--#include file="parahttps.asp" --> 

Then I typed in the Chrome browser (as anonimous) www.masstec.com.br/receitas and the green padlock did not appeared, as the site is considered 'not secure'.

The site has no other ASP files, just the DEFAULT.ASP file, which does redirections.

I appreciare your try to help me.



Thank you,
SitesMasstec

RE: Sub-folder does not show green padlock

(OP)
Hello Chris!

Will I have to modify the code you provided above?

CODE -->

<%
   If Request.ServerVariables("SERVER_PORT")=80 Then
      Dim SSL_URI
      SSL_URI = "https://"
      SSL_URI = SSL_URI & Request.ServerVariables("SERVER_NAME")
      SSL_URI = SSL_URI & Request.ServerVariables("URL")
      Response.Redirect SSL_URI
   End If
%> 

Do I have to put/change information or no change is necessary?

Thank you,
SitesMasstec

RE: Sub-folder does not show green padlock

You need to use root relative addressing when the include file is in the root folder and the requested file is in a subfolder.

CODE --> ASP

<!--#include file="/parahttps.asp" --> 

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close