I'm trying to force SSL (https) on an SVN repository served by mod_dav_svn. Here's what I have:
<Location /svn/projectname>
DAV svn
SVNPath /var/repo/projectname
Require valid-user
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/svn-auth-projectname
#here's what I tried (didn't work)
SSLCipherSuite HIGH:MEDIUM
</Location>
However, I don't get redirected to https when I log in via http; it stays in http. Why doesn't the above work? How do I get this https redirect to work?
I've seen suggestions about using mod_rewrite, e.g.:
# /dir/.htaccess
RewriteEngine on
RewriteCond %{SERVER_PORT}!443
RewriteRule ^(.*)$ https://www.x.com/dir/$1 [R,L]
However, I don't understand exactly what this does, so I'm afraid to use it. Plus, it looks more like an ugly hack than the correct solution.