httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wang Penghui <wangpeng...@realss.com>
Subject [users@httpd] redirect lots of http:// to https:// with mod_rewrite
Date Wed, 29 Dec 2004 15:19:15 GMT
Hi all:
	Sorry to ask so stupid question. Rewrite is so powerful that i could 
not manage it now.
Here is the question:
I have a domain named a.com, And i have lots of subdomains of it.
such as: a.a.com b.a.com c.a.com d.a.com etc...
I have bought a wildcard SSL certification (*.a.com) for all the subdomains.
But most of the users could not remember to type https:// before the 
domainnames.
So i have to redirect the *.a,com which the users inputed to 
https://*.a.com.
I want to use mod_rewrite to implement it.
Here is what i have writen in .htaccess:

RewriteEngine   on
RewriteBase     /
RewriteCond     %{HTTP_HOST}    ^(w+)\.eoa\.cn [NC]
RewriteRule     ^$  http://%{HTTP_HOST} [R]

But it seems working incorrect.
Could someone point out what wrong with it?

Thanks in advance!

Wang Penghui


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message