httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zac Stevens <...@cryptocracy.com>
Subject Re: Problem between http and https
Date Wed, 31 Jul 2002 12:35:22 GMT
Hi Edward,

On Wed, Jul 31, 2002 at 05:11:23PM +0800, EdwardSPL@ita.org.mo wrote:
> I have just got another function with php from my netfriend :
> create a index.php :
> <? header("Location:https://webmail.mydomain.com");exit;?>
> 
> So, which function is the best for me ?

I think for your particular situation, either will work - but there is a
difference.

The solution described by myself and others (using mod_rewrite) is flexible
in that it will redirect /any/ request to the appropriate HTTPS page.

eg, user goes to http://webmail.mydomain.com/lists/admin/index.php

With the mod_rewrite approach, this request would automatically be
redirected to https://webmail.mydomain.com/lists/admin/index.php

Using the index.php redirect as above, you would probably get a 404 "File
not found" error.  The answer would be to put the index.php into every
place where people could access your website, however this means a lot of
extra work for you.

Also, to use this you /must/ create a separate DocumentRoot for the non-SSL
site which contains the index.php file - you can't use the same
DocumentRoot as the SSL site, as it will probably have its own index.php
used by the webmail program.

In your case - where you are only supporting a webmail program where every
user has to start at the beginning of the site - both options will do what
you are trying to achieve.  I think the mod_rewrite option is less work for
you, but it does require that you have mod_rewrite in your server.

Hope that helps,


Zac


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message