cancel
Showing results for 
Search instead for 
Did you mean: 
Go to solution
XGeny
Novice

HTTP Does Not Force To HTTPS.

Hey,
I just can't fix this problem. I'm trying to force HTTP to HTTPS but it won't work.

1. I want the entire website to force HTTPS.
2. I want the user to redirect to https://mywebsite.net/home.

This is the code I use:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^mywebsite\.net$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mywebsite\.net$
RewriteRule ^/?$ "http\:\/\/mywebsite\.net\/home" [R=301,L]

I've also tried this code:

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]    

Some help would be awesome, thanks!

4 REPLIES
Highlighted
GoDaddy Pro Artisan
GoDaddy Pro Artisan

Re: HTTP Does Not Force To HTTPS.

Hi @XGeny

 

Try this code

# BEGIN HTTPS Redirection Plugin
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
# END HTTPS Redirection Plugin

 

For WordPress:
https://wordpress.org/plugins/https-redirection/

 

If you find above code is helpful, give me a kudos!.

 

 

XGeny
Novice

Re: HTTP Does Not Force To HTTPS.

It doesn't work @manojkumarcdo.

ExpressTaxi
Novice

Re: HTTP Does Not Force To HTTPS.

it worked for me, thank you.

 

wrefab
Novice
Solution

Re: HTTP Does Not Force To HTTPS.

I had the same problem. Despite having changed the .htaccess file of my root on cPanel using the code suggested by godaddy the website loaded either http or https depending on the URL.  I solved the problem with the wp plugin mentioned https://wordpress.org/plugins/https-redirection/ 

Now the website is forced to load as https! yeah, thanks manojkumarcdo