cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
New

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 4
Helper IV
Helper IV

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!.

 

 

New

Re: HTTP Does Not Force To HTTPS.

It doesn't work @manojkumarcdo.

Re: HTTP Does Not Force To HTTPS.

it worked for me, thank you.

 

New
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