HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

How To Redirect to HTTPS with .htaccess

19,482 views September 26, 2020 3:20

Watch on YouTube
ChannelTony Teaches Tech

Description from the creator

Learn how to redirect your website traffic from HTTP to HTTPS with the .htacces file. If you have ssh or FTP access to your Apache web server, you can modify your .htaccess file with a permanent 301 redirect to send all traffic to the HTTPS version of your website.

Code snippet:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ example.com/$1 [R=301,L,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"

Find more at tonyteaches.tech

#https #htaccess #apache

About this tutorial

Tony Teaches Tech published this 3:20 video tutorial on September 26, 2020. It has been watched 19,482 times on YouTube.

Duration
3:20
Published
September 26, 2020
Views
19,482
Likes
239

Tags

Share

This tutorial in other languages