Forcing https (ssl) on .htaccess file

To force the HTTPS connection on your website, add the following lines inside the website’s .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Need more clarification on this matter write to us via support@hostnasi.com

Giving You Internet freedom through hosting,domains, security, & more — everything you need to be online.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Bottom view of a tree

Types of React Hooks & Best Practices

Hooking up a React state store

FeathersJS with SQL (Objection.js)

ECMA Script features(ES6, ES7, ES8, ES9, ES10, ES11)

DOM handleEvent: a cross-platform standard since year 2000

Redact word documents using Python

Angular Server-side rendering using Angular-CLI

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
hostnasi com

hostnasi com

Giving You Internet freedom through hosting,domains, security, & more — everything you need to be online.

More from Medium

Securely exposing your Docker API

What the hell is this Docker ?

Transfer Data Between Your Computers Via WiFi (by SSH-ing)