You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ravi Roy <ra...@gmail.com> on 2013/05/03 05:16:50 UTC
[users@httpd] Rewrite rule redirection from http to https does not work.
Hi Guys,
My configuration is Apache/2.2.23 on CentOS x86_64, running Subversion
server. Recently I installed SSL certificates and I want to redirect all
request comming to http://myhostname.domain.com/svn/reponame to be
redirected to https://myhostname.domain.com/svn/reponame automatically.
This configuration is applicable to whole server, I'm not using VirtualHost
in my httpd.conf, I have following rule in my httpd.conf but it does not
work.
RewriteEngine On
RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Call to https://myhostname.domain.com/svn/reponame directly works fine.
I tried several permutation and combinations but it does not work, looks
like i'm missing something obivious..
Any help on this is appreciated.
Thanks.
Ravi.