Divi WordPress Theme

Error while adding redirect (301) rule on Cpanel to force ssl

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

Offline Chris

  • Junior Guru
  • **
  • Posts: 81
  • 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”.
VPS Hosting - AccuWebHosting

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: 45
  • 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

  • New Member
  • *
  • Posts: 27
  • 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

  • New Member
  • *
  • Posts: 12
  • 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:

asp error ASP 0131 :: Disallowed Parent Path

Started by AnonymousBoard ASP

Replies: 1
Views: 6330
Last post February 27, 2007, 08:33:57 PM
by Kailash
Awstats install error :: Perl not installed

Started by AnonymousBoard Windows

Replies: 1
Views: 4570
Last post May 06, 2007, 08:56:41 AM
by Kailash
MySQL error - Too many MySQL connections

Started by digitalpointBoard cPanel/WHM

Replies: 2
Views: 5110
Last post November 25, 2009, 07:02:28 PM
by kvchosting
Server Error in '/' Application :: Parser Error

Started by MikeBoard .NET Development

Replies: 1
Views: 7683
Last post July 04, 2007, 11:05:24 AM
by Kailash
Server Error - Application Error When Using Access with .Net

Started by TechBoard MS Access

Replies: 0
Views: 4921
Last post August 29, 2007, 02:24:39 AM
by Tech