My solution before would work well, this is a 100% proof as you can't rely
on referer.
Savut
"FLEB" <soon.the.sp@mmers.and.evil.ones.will.bow-down-to.us> wrote in
message news:m82kmnzf1okb.1klcwsg500zvd$.dlg@40tude.net... [color=blue]
> Regarding this well-known quote, often attributed to NotGiven's famous
> "Thu, 4 Dec 2003 17:23:51 -0500" speech:
>[color=green]
> > Yes, thanks.
> >
> > I am doing a series of pages and my hosting company offers a shared SSL[/color][/color]
cert[color=blue][color=green]
> > to use which the client asked for.
> >
> > Without a way to force all pages in the directory to be opened using[/color][/color]
SSL, I[color=blue][color=green]
> > resort to forcing it in the code - PHP.
> >
> > Thus you can rewrite the URL to access the page without using SSL. So:
> >
https://ssl.myhost.com/sssl.mydomain.com/page1.php
> >
> > could be rewritten to:
> >
http://www.mydomain.com/page1.php
> >
> > and viewed. I need to distinguish between what is being loaded using[/color][/color]
SSL[color=blue][color=green]
> > and not so I can do a location: redirect to the https version.
> >
> > If anyone knows of a way to do this using Apache, let me know. WIth[/color][/color]
Apache,[color=blue][color=green]
> > I have tried, SSLRequireSSL directive - doesn't work. Tried directory
> > cirective - doesn't work.
> >
> > Thanks.
> > "FLEB" <soon.the.sp@mmers.and.evil.ones.will.bow-down-to.us> wrote in
> > message news:1vkulc5jg6vsz.1trhac2nrluel.dlg@40tude.net... [color=darkred]
> >> Regarding this well-known quote, often attributed to NotGiven's famous
> >> "Wed, 3 Dec 2003 15:48:51 -0500" speech:
> >>
> >>> I need to verify if the page that led the user to this page used http[/color][/color][/color]
or[color=blue][color=green][color=darkred]
> >>> httpS.
> >>>
> >>> for example, if the use cam to my page from:
> >>>
httpS://www.dm.com/sample/foo.php
> >>>
> >>> I want to know as opposed to coming from:
> >>>
http://www.dm.com/sample/foo.php
> >>>
> >>> I've tried looking at PORT but it doesn't seem to work properly.
> >>>
> >>> Any ideas?
> >>>
> >>> Thanks.
> >>
> >> Could I ask why? More details might make it possible to provide a[/color][/color][/color]
better[color=blue][color=green][color=darkred]
> >> solution to the greater problem.
> >>
> >> --
> >> -- Rudy Fleminger
> >> --
Join Bytes!
> >> (put "Hey!" in the Subject line for priority processing!)
> >> --
http://www.pixelsaredead.com[/color][/color]
>
> Okay, I'm really in over my head on this one (I don't even know if I HAVE
> an SSL-enabled server, much less used the features), but can you get it to
> check whether the *current* page is being viewed SSL, then redirect to the
> SSL version of itself it's not.
>
> I'm just thinking that any checks would be worlds more safe and reliable[/color]
if[color=blue]
> it was the current page being checked, since HTTP is stateless (preserves
> no information) and all information about previous activity has to be
> continuously sent back-and-forth (with possible spoofing or security
> implications).
>
> --
> -- Rudy Fleminger
> --
Join Bytes!
> (put "Hey!" in the Subject line for priority processing!)
> --
http://www.pixelsaredead.com[/color]