How to Force SSL with htaccess

WhoAmI => notes.sohag.pro/author
Search for a command to run...

WhoAmI => notes.sohag.pro/author
No comments yet. Be the first to comment.
Docker has become a popular platform for containerization, allowing developers to easily create, deploy, and run applications in a lightweight and portable environment. In this blog post, we will explore what Docker is, how to install it, and how to ...
I had a solid list of reasons my life wasn't moving faster, until a grainy old lecture pointed out the one name missing from it

The finale isn't a victory lap. It's the story of the control I shipped that did nothing, the footgun still sitting in my demo, and the handful of things I'd keep exactly as they are.

How do you hold a large payment for a second pair of eyes without ever letting the unapproved money touch a balance, and how do you stream that decision to the outside world without standing up a broker?

How do you show the total under a parent account when the whole system refuses to store a balance? A recursive query, a trigger that refuses to draw a circle, and a rule about what actually has to sum to zero.

Every time I wanted to change an FX rate I had to edit a file on the server and restart the app. So I moved rates and markup into a live admin API, and then audited it hard enough to find the bug that quietly undid the whole thing.

If you have a website running on apache2 and SSL certificate installed, but your visitors are landing on http connection sometimes, then you are in the right place.
Find your active htaccess file in the server. If there is not any, create one.
Use the below lines in the top of your htaccess file to force all users to visit your site with https
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
One important note: you need to enable ***RewriteEngine *** first.
sudo a2enmod rewrite
Thank you 👍😊