Re: Urgent !!! - Rewrite issue

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

 



All you need is an additional virtualhost that will catch all requests that need to be redirected. See http://wiki.apache.org/httpd/CanonicalHostNames for details on this. Note that the example there redirects from www.example.com to example.com, but the same principles apply.

Kind regards,
Mathijs Schmittmann

On Sat, Mar 17, 2012 at 6:58 PM, aparna Puram <aparnapuram@xxxxxxxxx> wrote:
Hello All,

I am working on a project where I have to redirect all the http requests to https protocol. I have configured the following rewrite rules and it is working fine.

RewriteEngine On
RewriteCond  %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://<dns name>$1 [L,R]


then http://<dns name> is redirecting to https://<dns name>
&     http://<localhost name> is redirecting to htps://<dns name>

However, https://<localhost name> is not being redirected to https://<dnsname>, It is just being https://localhost

Since I have a ssl installed with the common name (CN) as the dns name.

I need the https://local host name to be redirected to https://dns name.

Kindly suggest me what needs to be done.

Thanks in advance.

[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