[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] How to force httpS for a directory--RaQ4
- Subject: RE: [cobalt-users] How to force httpS for a directory--RaQ4
- From: "Dan Kriwitsky" <webhosting@xxxxxxxxx>
- Date: Wed Jan 30 04:24:02 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
> The problem is deeper than that Jeff as I asked the same
> question some time ago having tried an htaccess suggestion
> which would have been ideal but didn't work. If you have one
> page or a directory in a site that you want to force https I
> don't see how a refresh is going to do it unless you use the
> php option in your code which is ok if you allow all your
> customers php.I suppose you could refresh to a subdomain but
> even then it is possible to get linked externally to the same
> page through http which I what I want to avoid as I suspect
> others do as well.
>
Came across this JavaScript:
<script language="Javascript" type="text/javascript">
var loc = document.location.toString();
var index = loc.indexOf(":");
var url = loc.substring(index,loc.length);
if (index == "4") {
secureUrl = "https" + url;
location.replace(secureUrl); // get rid of current page in
history
location.href = secureUrl;
}
</script>
I haven't tested it.
Found some other pages in a Google search as well for PHP but
www.phpbuilder.com doesn't seem to be working.
The other thought, although I haven't worked with the secure
httpsd.conf, if it's separate from the httpd.conf file, use a Redirect
in the httpd.conf file.
Redirect /whatever/ https://www.domain.com/whatever/
Redirect /dir/file.html https://www.domain.com/dir/file.html
--
Dan Kriwitsky