How to Redirect All Http to Https through .htaccess File in WordPress

Опубликовано: 07 Июль 2022
на канале: WebTask With Hassan
263
4

In this wordpress tutorial for beginners you will learn how to redirect or force all http link to https via htaccess file in wordpress.

If you have an SSL certificate then you might want to redirect all non-secure (HTTP) traffic to https. You can do this by adding the below code the .htaccess file in the root of your WordPress install.

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

#https #https #htaccess #wordpress #webtaskwithhassan #hassangilani