How to redirect http automatically on https owncloud

Hi,

I need help regarding my owncloud setup, I already force the https in my owncloud website but my problem is when I access HTTP only it does not automatically redirect on HTTPS. I need to use always https:// to access my owncloud server. Thanks.

I use this setup below.

ucr set apache2/force_https=yes

Then create /var/www/.htaccess with the following content:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) [https://%{HTTP_HOST}%{REQUEST_URI}

Hi.

Normaly the ucr variable apache2/force_https is enough.
Have you restarted the apache2 service?

Kind regards
Basti

Mastodon