PDA

View Full Version : After change to HTTPS indicate Site Not Secure


gnrx
05-10-2017, 08:47 AM
Hi,
A few days ago, I change my site to https.
I made the changes in admincp-options-site name
Also, in templates with http to https
Also, I add in my public_html directory (I have a vbadvanced) and in my forum directory, in .httacess this code:
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
The sewcond and third line are automatically add by server.

Well, access with https but also chrome, like firefox like chromium indicate that, my syte are not secure.

I search and search, but I don't view how are the problem or the issue for this.

Thanks in advanced.

Flipfloptrader
05-10-2017, 09:40 AM
Hi

There shouldn't be any need to alter any templates?

Try this for your htaccess:

Change flipfloptrader to your url name.

#RewriteEngine On

RewriteEngine On
RewriteCond %{HTTP_HOST} www.flipfloptrader.com$
RewriteRule ^(.*)$ https://flipfloptrader.com/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://flipfloptrader.com/$1 [R,L]

ExpiresActive Off

gnrx
05-10-2017, 09:48 AM
In the first time, thank you for your help.

Hi

There shouldn't be any need to alter any templates?
Yes, in templates I made some changes, and in stylevar I change the http to https for url images.
In templates I made this:
search for src="http: in admincp->Search in Templates and then replace for https

Try this for your htaccess:

Change flipfloptrader to your url name.

#RewriteEngine On

RewriteEngine On
RewriteCond %{HTTP_HOST} www.flipfloptrader.com$
RewriteRule ^(.*)$ https://flipfloptrader.com/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://flipfloptrader.com/$1 [R,L]

ExpiresActive Off

A doubt, I have 2 .htaccess, one in my public_html directory (I have vbadvanced) with my code in .htaccess if I access to public_html (portal of vbadvanced) indicate that, my site its secure, when click in forum (folder forum under public_html) appears not secure.
Well, this change, in this 2 .htaccess?
If its yes, I deduce that, the url https://flipfloptrader.com/ I need change for https://flipfloptrader.com/forum under .htaccess in my forum folder, its correct?

Thank you very much!

--------------- Added 1494417826 at 1494417826 ---------------

Hello again,
I t est with your code, and I have a error, because un public_html directory, I have redirect from https://mydomain to https://www.mydomain

This are the codes:
htaccess of public_html:
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTP_HOST} ^mydomain\.com
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L]

And this, htaccess from my forum directory:
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Thanks in advanced.

Flipfloptrader
05-10-2017, 10:37 AM
Try this:

#RewriteEngine On

RewriteEngine On
RewriteCond %{HTTP_HOST} flipfloptrader.com$
RewriteRule ^(.*)$ https://www.flipfloptrader.com/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.flipfloptrader.com/$1 [R,L]


Remember to replace with your url.

gnrx
05-10-2017, 12:04 PM
I try this code in my public_html folder (folder of vBAdvanced) and not works my site (enter in bucle mode).

Also, try this code in my public_html/forum folder, load website but continue appears like not secure.

Also, I contact with my host for if can help me.

Thank you very much!

--------------- Added 1494425777 at 1494425777 ---------------

Edit/Add:
In this moment, I view that, the problem appears that the site is not secure appears in index of forum, in some subforums also, but in others not appears, and in the threads (that I test) not appears.
I review all images in index forum and all point to https.

--------------- Added 1494433886 at 1494433886 ---------------

Well, my hosting not provide support for this redirects.

At the moment, your code works in my public_html folder, but in my public_html/forum folder not works because I suppose this code need are different.

Regards!

Stratis
05-10-2017, 05:06 PM
Here you go :)
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Exactly as it is.

Mark.B
05-10-2017, 05:46 PM
Would help if we had a link to the site.

gnrx
05-10-2017, 07:47 PM
Wow, works fine fine, perfect!
I add this code in my 2 .htaccess (public_html and public_html/forum) and works really nice!!
Change http for https and add www if I not type.

Now, go to search the reasson because, in the index forum appears Not Secure, but in subforums appears Secure Site.

Thank you very much!!!!!!

gnrx
05-11-2017, 08:27 PM
Also, solved last issue (index forum appears Not Secure and in subforums appears Secure Site).
The problem was, in the index forum, I have some blocks, one of this blocks contain http code, but I was changed to https, with this change, continue with No Secure Site.
I deleted this block and now, my index forum appears Secure Site.

Thank you at all!