Web Hosting Main Forums > cPanel/WHM

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

(1/1)

Chris:
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”.

Kailash:
Try redirecting using .htaccess rewrite rule:

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

Dewlance:
If you are using Wordpress or any other CMS software then in URL use https:// instead of http:// or SSL plugin.

dream_webhosts:
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]

kumkum:
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.

Navigation

[0] Message Index

Go to full version