I use SL(another rhel clone) and this works for me:
RewriteEngine on ReWriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%%7BHTTP_HOST%7D/$1 [NC,R,L]
On 2017-03-09 19:47, Robert Moskowitz wrote:
I am working on Centos7 which provides roundcubemail 1.1.7 and Apache 2.4.
My current server is Redsleeve6 (Centos6 for armv7) which I installed roundcubemail 1.0.4.
With help here 4 years ago I developed a rewrite rule:
<VirtualHost *:80> ServerName webmail.test.htt-consult.com ServerAlias webmail
RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] ExpiresDefault "access plus 10 years" AddOutputFilterByType DEFLATE text/html text/plain text/xml php_admin_flag session.cookie_secure "1"
</VirtualHost>
This is not working 'right' in Apache 2.4. It seems to redirecting ALL accesses to the server to https, not just to the virtual host of webmail.test.htt-consult.com.
So looking at Harald's post from back in 12/31/2012, I tried:
<VirtualHost *:80> ServerName webmail.test.htt-consult.com ServerAlias webmail
RewriteEngine On ReWriteCond %{HTTP_HOST} =webmail.test.htt-consult.com [NC] RewriteCond %{SERVER_PORT} !=443 RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] ExpiresDefault "access plus 10 years" AddOutputFilterByType DEFLATE text/html text/plain text/xml php_admin_flag session.cookie_secure "1"
</VirtualHost>
And that is even worst. Attempts to access z9m9z.test.htt-consult.com/mailadmin just loop. Take this out and I can get to mailadmin.
So can someone help me here with current rewriterules to force roundcube to https while not impacting on other uses of the server?
thanks _______________________________________________ Roundcube Users mailing list users@lists.roundcube.net http://lists.roundcube.net/mailman/listinfo/users