httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean T Allen <s...@usaherbals.com>
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
eoa.cn then pass it through as is...

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

If WELL FORMED
    CONTINUE
ELSE
    
     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 https://blah.a.com to http://blah.a.com
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 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