Redirect to HTTPS

Hello everyone!

I’m trying to configure so that the the url woulth automatically redirect to https.

I added this in etc/httpd/conf.d/freepbx.conf

<VirtualHost :80>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^/admin(.
)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

It works but it only redirects the admin panel. It won’t redirect the ucp page.

Is there anything else that I need to add?

Nevermind, it works correctly with this line:

<VirtualHost :80>
RewriteEngine on
RewriteRule "^/?(.
)" “https://%{HTTP_HOST}/$1” [R=301]

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.