[FX.php List] [OFF] Rewrite for forcing http to https possible?
Bob Patin
bob at patin.com
Thu Sep 11 16:23:00 MDT 2008
Tim,
Is there a compelling reason why that's a better method? Since the
redirect happens immediately, there isn't any security issue there, is
there?
Just wondering... always willing to learn a better way to do
things... :)
BP
Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
AIM: longterm1954
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting
On Sep 11, 2008, at 5:15 PM, Tim 'Webko' Booth wrote:
>
> Well, if they're actually the same page but on different ports (80
> for http, ?? for https) I'd use a server side redirect rather than a
> client-side.
>
> I'd think that with some of the SERVER variables you could do
> something like
>
> <?php if ($_SERVER['SERVER_PORT'] == 80) {
> //Construct a variable pointing back to the same name under https
> $server = $_SERVER['SERVER_NAME'];
> $page = $_SERVER['PHP_SELF'];
> header['location: https://$server/$page/'];
> } ?>
>
> (And I'm certain that is not correct code, but it's where I'd start
> and fiddle with it from there...)
>
> Cheers
>
> Webko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20080911/bb3c37f9/attachment.html
More information about the FX.php_List
mailing list