HI
i have installed ssl, and then i tried to redirect http to https. i write the following code to .htaccess file
RewriteEngine on
RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{HTTP_HOST} ^(www\.)?j3s\.com\.au
RewriteRule ^(.*)$ https://www.j3s.com.au/$1 [R,L]
can you please help me to fix the issue. http to https redirection doesnot work
Solved! Go to Solution.
Hey there @smsafkat
If you're on cPanel Linux Hosting, give this a shot:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
Hey there @smsafkat
If you're on cPanel Linux Hosting, give this a shot:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
I am using the Plesk admin and I have tried editing the .htaccess file and adding a web.config file based on some responses here. Of course, I tried each separately. Neither seems to redirect the http to https. Should I be doing something different in Plesk. I did not try your suggestion because I am not using Cpanel. Any help appreciated.
RewriteEngine On
# This will enable the Rewrite capabilities
RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
# This rule will redirect users from their original location, to the same location but using HTTPS.
# i.e. http://www.example.com/foo/ to https://www.example.com/foo/
# The leading slash is made optional so that this will work either in httpd.conf
# or .htaccess context
#END