httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean T Allen <>
Subject Re: [users@httpd] redirect lots of http:// to https:// with mod_rewrite
Date Wed, 29 Dec 2004 16:42:06 GMT
Well first, you arent redirecting to an https

2nd you all your rule says if if it is a subdomain of then pass it through as is...

it looks like i could pseudo your stuff out as...

     and you have nothing to deal with the else...

And lastly you never address whether the incoming is a https or not
so it should be taking to
which i dont think is what you want either...

Wang Penghui wrote:

> 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, And i have lots of subdomains of it.
> such as: etc...
> I have bought a wildcard SSL certification (* 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://*
> 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:> for more info.
> To unsubscribe, e-mail:
>   "   from the digest:
> For additional commands, e-mail:

View raw message