How to re-direct site to always use HTTPS?

I actually use a different method with my ownCloud setup.

In my vhosts file, I have:

<VirtualHost *:80>
    ServerName mydomain.org
    Redirect permanent / https://mydomain.org/
</VirtualHost>

Did you get it working ok? (With your .htaccess or otherwise?)

EDIT: This works with subdomains too. For example, I have a virtualhost section for mail.mydomain and cloud.mydomain and they all work perfectly.

Good luck!

1 Like