title: Apache shows default page instead of https when using http
body: <p>I'm trying to redirect all my foo.mydomain.com requests to <a href="https://foo.mydomain.com" rel="nofollow">https://foo.mydomain.com</a>.</p>
  
  <p>My VirtualHost contains this:</p>
  
  <pre><code>&lt;VirtualHost *:443&gt;
      ServerName foo.mydomain.com
  
      # Indexes + root dir
      DirectoryIndex index.html
      DocumentRoot /home/web/foo.mydomain.com/htdocs
  
      SSLEngine on
  
      SSLCertificateFile /etc/apache2/ssl/server.crt
      SSLCertificateKeyFile /etc/apache2/ssl/server.key
  
      SSLVerifyClient none
  
      &lt;IfModule mime.c&gt;
              AddType application/x-x509-ca-cert      .crt
              AddType application/x-pkcs7-crl         .crl
      &lt;/IfModule&gt;
  
      # Logfiles
      ErrorLog /home/web/foo.mydomain.com/logs/error.log
      CustomLog /home/web/foo.mydomain.com/logs/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>So now I'm trying to redirect all the http-request to https with mod_rewrite in this .htaccess file:</p>
  
  <pre><code>Options FollowSymLinks
  RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://foo.mydomain.com
  </code></pre>
  
  <p>Does anyone knows what I'm doing wrong? Thank you in advance!</p>