Re: [users@httpd] redirecting everything to ssl

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

 



On 11/30/05, Rob Benton <rob.benton@xxxxxxxxxxxxxx> wrote:
> I've got a site on my intranet running with mod_ssl.  This site used to
> run over plain http://.  I'd like to redirect everyone trying to access
> the old address to the new address via https://.
>
> I tried just:
> Redirect permanent http://site https://site
>
> but I get a 400 Bad Request error.  I also looked at mod_rewrite but
> wasn't sure if it would work for this.  What is the
> simplest/best/easiest way to do this?

I use:
        RewriteEngine on
        RewriteCond %{HTTP_HOST} !^xwis.net [NC]
        RewriteRule ^/(.*)       http://xwis.net/$1 [l,r=permanent]

You would not use the Cond and use https in the Rule.

[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