I'm using this to force access to phpmyadmin onto HTTPS but it's staying on HTTP, other directives in the .htaccess file of the site work fine.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^/phpmyadmin/(.*)$ https://my.site.net/phpmyadmin/$1 [R,L]
<VirtualHost 89.24.24.24:80>
DocumentRoot /home/site/public_html
ServerName my.mysite.net
ErrorLog /var/log/httpd/error_log
ErrorLog /var/log/httpd/error_log
CustomLog "|/usr/sbin/rotatelogs home/sitel/logs/access_log.%Y.%m.%d 86400" combined
Options ExecCGI
TraceEnable off
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F]
</VirtualHost>
<VirtualHost 89.24.24.24:443>
DocumentRoot /home/site/public_html/phpmyadmin
ServerName my.mysite.net
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/csvsvsv3.crt
SSLCertificateKeyFile /etc/pki/tls/private/site.key
SSLCertificateChainFile /etc/pki/tls/certs/bundle.crt
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite RC4:HIGH:!ADH:!DH:!AES:!EXPORT:!SSLv2:!3DES
Options ExecCGI
TraceEnable off
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</VirtualHost>
[rid#7f0269d20118/initial] (2) init rewrite engine with requested uri /phpmyadmin/
[rid#7f0269d20118/initial] (3) applying pattern '.*' to uri '/phpmyadmin/'
[rid#7f0269d20118/initial] (4) RewriteCond: input='GET' pattern='^(TRACE|TRACK)' => not-matched
[rid#7f0269d20118/initial] (1) pass through /phpmyadmin/
[rid#7f0269d26148/subreq] (2) init rewrite engine with requested uri /phpmyadmin/index.php
[rid#7f0269d26148/subreq] (3) applying pattern '.*' to uri '/phpmyadmin/index.php'
[rid#7f0269d26148/subreq] (4) RewriteCond: input='GET' pattern='^(TRACE|TRACK)' => not-matched
[rid#7f0269d26148/subreq] (1) pass through /phpmyadmin/index.php
[rid#7f0269d20118/initial] (2) init rewrite engine with requested uri /phpmyadmin/phpmyadmin.css.php
[rid#7f0269d20118/initial] (3) applying pattern '.*' to uri '/phpmyadmin/phpmyadmin.css.php'
[rid#7f0269d20118/initial] (4) RewriteCond: input='GET' pattern='^(TRACE|TRACK)' => not-matched
[rid#7f0269d20118/initial] (1) pass through /phpmyadmin/phpmyadmin.css.php
[rid#7f0269d20118/initial] (2) init rewrite engine with requested uri /phpmyadmin/themes/original/img/logo_right.png
[rid#7f0269d20118/initial] (3) applying pattern '.*' to uri '/phpmyadmin/themes/original/img/logo_right.png'
[rid#7f0269d20118/initial] (4) RewriteCond: input='GET' pattern='^(TRACE|TRACK)' => not-matched
[rid#7f0269d20118/initial] (1) pass through /phpmyadmin/themes/original/img/logo_right.png
[rid#7f0269d20118/initial] (2) init rewrite engine with requested uri /phpmyadmin/print.css
[rid#7f0269d20118/initial] (3) applying pattern '.*' to uri '/phpmyadmin/print.css'
[rid#7f0269d20118/initial] (4) RewriteCond: input='GET' pattern='^(TRACE|TRACK)' => not-matched
[rid#7f0269d20118/initial] (1) pass through /phpmyadmin/print.css