HTACCESS FOR HTTPS

I have a sub domain like this - abc.domain.com

I want to force the url to https. I'm using this:

RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

But its not wokring. Can anyone please help?

Comments

Sign In or Register to comment.
Support CyberPanel CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!