Apache redirection using http response headers

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

 



I want to force the user browser to use https URL when accessing my server (even if the user enters http URL). I have done redirections using "redirect" & "rewrite" but would also like to use this method.


I load the headers module and add the following to my /etc/apache/sites-enabled/example.conf 

Header set Location https://www.example.com/ 
Header set X-Forwarded-Proto: https 
Header set Strict-Transport-Security "max-age=180; includeSubdomains"

Although the server receives a the headers I set there is no redirection (default apache page is shown). Is there anything else I need to do so that the browser receives a http response from my server and automatically changes the http request to https?

-- 
Cheers, 

Asad

Virus-free. www.avast.com

[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