Re: checking for and enforcing https

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux