Re: apache redirection

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



On 21 May 2010 22:04, Ski Dawg <centos@xxxxxxxxxxx> wrote:
On Wed, May 19, 2010 at 7:45 PM, Barry Brimer <lists@xxxxxxxxxx> wrote:
As for the redirection, I would handle it with mod_rewrite as follows:

<VirtualHost XXX.XXX.XXX.XXX:443>
ServerName domain.tld
RewriteCond %{HTTP_HOST}   !^www\.domain\.tld$ [NC]
RewriteCond %{HTTP_HOST}   !^$
RewriteRule ^/(.*)         https://www.domain.tld/$1 [L,R=301]
</VirtualHost>

Those rewrite suggestions will not accomplish in solving the problem
you presented....

I wish people would actually read through the replies before
suggesting something that has already been shown not to work ^^

James,

Perhaps you didn't notice the part in my message where I indicated that this would require separate IP addresses with appropriate certs on each, such as domain.tld and www.domain.tld. My example does not include important things that are part of the configuration already to serve an https website with mod_rewrite support such as:

SSLEngine On SSLCertificateFile ... SSLCertificateKeyFile ...
RewriteEngine On
... etc

I am surprised to hear that this doesn't work since it works fine for me. What part do you feel doesn't work?

Barry
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux