Advertisement:

Author Topic: How to redirect form HTTP to HTTPS  (Read 1317 times)

Arup

  • Newbie
  • *
  • Posts: 13
How to redirect form HTTP to HTTPS
« on: April 17, 2018, 03:05:21 pm »
Dear All member

We have installed OSclass script against the domain namely jibika.co.in
and have installed SSL Certificate with this respective domain but it is still not redirecting to https
can any one please let us know the exactly which one of the .htaccess file need to be edited for redirection ? as we could see there is quite no of file is available in the same name within a different folder
all the available .htaccess files have code installed in it. We are bit confused, whether the entire existing codes need to be removing and install new code instead or partial? And  what  all are the line of codes thats need to be replace with the existing files ? Please help
We have check it with - whynopadlock.com and found a list of mixed content error.  List is very big we are sending few of them for your ready ref.
Please help us to resolve the issue
Thanks and Regards
Arup Sinha
Result :
 You currently have TLSv1 enabled.
This version of TLS is being phased out. This warning won't break your padlock, however if you run an eCommerce site, PCI requirements state that TLSv1 must be disabled by June 30, 2018.
Mixed Content - Errors
 Hard Failure
 A style-sheet with an insecure url of "http://jibika.co.in/oc-content/themes/hero/css/owl.carousel.css" was loaded on line: 21 of https://jibika.co.in/.
Hard Failure
 A style-sheet with an insecure url of "http://jibika.co.in/oc-content/themes/hero/css/bootstrap.min.css" was loaded on line: 22 of https://jibika.co.in/.
Hard Failure
 A style-sheet with an insecure url of "http://jibika.co.in/oc-content/themes/hero/css/hero.css" was loaded on line: 23 of https://jibika.co.in/.
Soft Failure
 An image with an insecure url of "http://jibika.co.in/oc-content/themes/hero/images/slider/slider11.jpg" was loaded on line: 401 of https://jibika.co.in/.
Form Failure
 A form with the action of "http://jibika.co.in/index.php" exists in the source code of the tested page.
________________________________________________________________________________
This URL will need to be updated to use a secure URL for your padlock to return.

gunit

  • Jr. Member
  • **
  • Posts: 63
Re: How to redirect form HTTP to HTTPS
« Reply #1 on: April 17, 2018, 07:14:25 pm »
Post your .htaccess

Here's mine.

Code: [Select]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
</IfModule>

gunit

  • Jr. Member
  • **
  • Posts: 63
Re: How to redirect form HTTP to HTTPS
« Reply #2 on: April 17, 2018, 07:17:25 pm »
Dear All member

We have installed OSclass script against the domain namely jibika.co.in
and have installed SSL Certificate with this respective domain but it is still not redirecting to https
can any one please let us know the exactly which one of the .htaccess file need to be edited for redirection ? as we could see there is quite no of file is available in the same name within a different folder
all the available .htaccess files have code installed in it. We are bit confused, whether the entire existing codes need to be removing and install new code instead or partial? And  what  all are the line of codes thats need to be replace with the existing files ? Please help
We have check it with - whynopadlock.com and found a list of mixed content error.  List is very big we are sending few of them for your ready ref.
Please help us to resolve the issue
Thanks and Regards
Arup Sinha
Result :
 You currently have TLSv1 enabled.
This version of TLS is being phased out. This warning won't break your padlock, however if you run an eCommerce site, PCI requirements state that TLSv1 must be disabled by June 30, 2018.
Mixed Content - Errors
 Hard Failure
 A style-sheet with an insecure url of "http://jibika.co.in/oc-content/themes/hero/css/owl.carousel.css" was loaded on line: 21 of https://jibika.co.in/.
Hard Failure
 A style-sheet with an insecure url of "http://jibika.co.in/oc-content/themes/hero/css/bootstrap.min.css" was loaded on line: 22 of https://jibika.co.in/.
Hard Failure
 A style-sheet with an insecure url of "http://jibika.co.in/oc-content/themes/hero/css/hero.css" was loaded on line: 23 of https://jibika.co.in/.
Soft Failure
 An image with an insecure url of "http://jibika.co.in/oc-content/themes/hero/images/slider/slider11.jpg" was loaded on line: 401 of https://jibika.co.in/.
Form Failure
 A form with the action of "http://jibika.co.in/index.php" exists in the source code of the tested page.
________________________________________________________________________________
This URL will need to be updated to use a secure URL for your padlock to return.

Disable all your plugins.

Edit those CSS files from http to https in your head file.

Choose another theme you have installed and choose your theme again.

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: How to redirect form HTTP to HTTPS
« Reply #3 on: April 17, 2018, 08:03:38 pm »
i think you only need to modify the config.php file

define('WEB_PATH', 'http://yoursite.com');

to

define('WEB_PATH', 'https://yoursite.com');

Aficionado

  • Guest
Re: How to redirect form HTTP to HTTPS
« Reply #4 on: April 17, 2018, 08:03:57 pm »
I'm not sure the above redirection from @gunit is correct. Also this https must be executed BEFORE the mod_rewrite of Osclass and not AFTER (as @gunit posted).

Here is what works and is verified:

Code: [Select]
#SSL START

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R=301,L]

#SSL END
« Last Edit: April 17, 2018, 08:15:06 pm by Aficionado »

Arup

  • Newbie
  • *
  • Posts: 13
Re: How to redirect form HTTP to HTTPS
« Reply #5 on: April 19, 2018, 10:57:42 am »
Thanks, -  to all of you for your valued support, but still I am bit confused, not be able to understand which one will be the best way to resolve the issue 

I need more information on this

My humble request to all of you, Please extend your support and oblige me.

Best Regards
Arup

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: How to redirect form HTTP to HTTPS
« Reply #6 on: April 19, 2018, 05:57:10 pm »
to solve the problem with https and the CSS you should check the file config.php and change

define('WEB_PATH', 'http://yoursite.com');

to

define('WEB_PATH', 'https://yoursite.com');

Then to redirect to https you need to edid the htaccess file as suggested

Arup

  • Newbie
  • *
  • Posts: 13
Re: How to redirect form HTTP to HTTPS
« Reply #7 on: April 24, 2018, 06:09:19 pm »
Thanks to all

Summerpixie

  • Newbie
  • *
  • Posts: 28
Re: How to redirect form HTTP to HTTPS
« Reply #8 on: April 27, 2018, 12:26:12 pm »
Thank you very much Gunit, I struggled to understand how to redirect and after following your advice on how to modify the htaccess file, it finally works. :)

Arup

  • Newbie
  • *
  • Posts: 13
Re: How to redirect form HTTP to HTTPS
« Reply #9 on: October 01, 2018, 01:31:26 pm »
Dear All

I am getting back after since long,  for the same  redirection issue.  I have tried hard to resolved this issue but could not be able to solve it properly,

can any one please take some pain once again for us to resolve this issue  ?

while we changing the .htaccess code  it is redirecting  from http to https but the site is neither  visible properly nor all of its feature are working properly. We are not even able to logged into the Admin panel.

Actually  this  script was installed in a Linux shared server, &  we purchased the Respective Hero theme, plugins  and SSL on it, latter on we have migrated this shared hosting with Cloud Hosting packages.

Still we are not be able to replicate the issue, our humble request to all of You,  Please help us to resolve.

We expecting a early response

Thanks and Regards
Arup Sinha
 

Aficionado

  • Guest
Re: How to redirect form HTTP to HTTPS
« Reply #10 on: October 01, 2018, 02:50:25 pm »
Could you enable Osclass Debug to a Log, just to rule out any other problems ? And post any errors here ?

Also disable for a while permalinks of Osclass. Does it work without ?

Arup

  • Newbie
  • *
  • Posts: 13
Re: How to redirect form HTTP to HTTPS
« Reply #11 on: October 13, 2018, 12:55:59 pm »
Thanks Aficionado, for your kind support

I have disable permalinks and its working properly, still did not found any other issue after this change has been made. should this be disable permanently?

and how do I enable Osclass debug to a log? please help

Best Regards
Arup

BritWeb

  • Hero Member
  • *****
  • Posts: 770
  • If it ain't broke, don't fix it.
Re: How to redirect form HTTP to HTTPS
« Reply #12 on: October 22, 2018, 11:19:50 pm »
Have a look at this -> https://doc.osclass.org/Debug_PHP_errors

Regards

pixelpadre

  • Jr. Member
  • **
  • Posts: 76
Re: How to redirect form HTTP to HTTPS
« Reply #13 on: November 01, 2018, 03:26:39 pm »
Your problem is simple.  Server is not redirecting http to https.  A simple modification of apache vhost config file will fix your problem.

windson

  • Newbie
  • *
  • Posts: 22
Re: How to redirect form HTTP to HTTPS
« Reply #14 on: June 20, 2019, 09:19:33 pm »
Copy and paste as is in .htaccess


<IfModule mod_rewrite.c>
RewriteEngine On

### WWW & HTTPS

# ensure www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# ensure https
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

### WWW & HTTPS

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


</IfModule>