mod_rewrite config

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

 



Hi,

I'd like to redirect all traffic going to https://www.mywebsite.com to https://store.mywebsite.com instead.

But I want traffic going to http://www.mywebsite.com to be left alone.

I tried with the following config:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www.mywebsite.com$ [NC]
RewriteCond %{HTTPS} =on
RewriteRule ^/?(.*) https://store.mywebsite.com/$1 [R,L]

But it does not work.

Traffic going to https://www.mywebsite.com is not rewritten to https://store.mywebsite.com.

What am I doing wrong ?

Thanx !


CCDMD 20 ans !

Jonathan-Marc Lapointe
Technicien en informatique,
Administrateur système,
Administrateur réseau

Centre collégial de développement de matériel didactique
6220, rue Sherbrooke Est, bureau 404
Montréal (Québec) H1N 1C1
(514) 864-8928
www.ccdmd.qc.ca
jmlapointe@xxxxxxxxxxx
Skype: jmlccdmd

[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