Re: checking for and enforcing https
| From: | Aleksandar Vojnovic | Date: | Tue, 26 Feb 2008 15:03:28 +0000 |
| Subject: | Re: checking for and enforcing https | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-270162@lists.php.net to get a copy of this message | ||
If you are running Apache you could use a rewrite rule for such a case. Example below
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(my|folder|examples) /https/://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Aleksander
Per Jessen wrote:
tedd wrote:Sometimes I feel like a child here. Under what circumstances would one require that? If your script is in a https directory, isn't that secure? OR, is this something else? Please explain.You might want to do such checks if your website (www.example.com) is accessible over http and https both. Typically you'll have separate content, but it might be possible for a user to accidentally access non-secure content over https which is just wasteful, or vice versa which is clearly a security risk. /Per Jessen, ZĂĽrich