Rewrite rule redirection from http to https does not work.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
 

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux