Divi WordPress Theme

Topic: Error while adding redirect (301) rule on Cpanel to force ssl  (Read 1200 times)

Offline Chris

  • Junior Guru
  • **
  • Posts: 77
  • iTrader: +0/-0
    • View Profile
Error while adding redirect (301) rule on Cpanel to force ssl
« on: October 31, 2019, 11:50:08 AM »
I am new to server and cpanel. I have successfully purchased and installed ssl certificate on my domain. Now when I try to add redirect (301) for http to HTTPS for all traffic under cpanel its giving error ” The is error in Apache rule while processing your request”.
Ezdefi

Offline Kailash

  • Web Hosting Master
  • *****
  • Administrator
  • Posts: 660
  • iTrader: +153/-0
    • View Profile
Re: Error while adding redirect (301) rule on Cpanel to force ssl
« Reply #1 on: October 31, 2019, 11:50:40 AM »
Try redirecting using .htaccess rewrite rule:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

Offline Dewlance

  • New Member
  • *
  • Posts: 44
  • iTrader: +0/-0
    • View Profile
Re: Error while adding redirect (301) rule on Cpanel to force ssl
« Reply #2 on: January 06, 2020, 01:06:13 PM »
If you are using Wordpress or any other CMS software then in URL use https:// instead of http:// or SSL plugin.

Offline dream_webhosts

  • Newbie
  • *
  • Posts: 7
  • iTrader: +0/-0
    • View Profile
Re: Error while adding redirect (301) rule on Cpanel to force ssl
« Reply #3 on: April 23, 2020, 09:20:01 PM »
To set the redirection from HTTP to HTTPS use below code under .htaccess file

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

Offline kumkum

  • Newbie
  • *
  • Posts: 9
  • iTrader: +0/-0
  • https://hosting.india.to/
    • View Profile
Re: Error while adding redirect (301) rule on Cpanel to force ssl
« Reply #4 on: August 31, 2020, 10:04:53 PM »
Hi everyone,
I know this is old post and you have also post right thing about redirection to https.
I just want to add that you can also redirect from http to https from cpanel:
- Login to cpanel
- Under domain section click on "Force HTTPS Redirect"
- From this you can redirect your website from http to https without adding code in .htaccess file.

According to me this is the easiest way for the https redirection.
Shopify Divi WordPress Theme
Tags: