This page should be coming to you via a re-write , like this...
RewriteEngine on # ===== force HTTPS : intended for SHOP pages ====== # IF... this is not already an HTTPS request # AND... we are not at localhost # AND... we are not in check_auth directory # THEN...dont capture the optional www; capture the rest of the host # AND... form the new URL as an https protocol + host + request_uri + a timestamp RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} !^localhost$ [NC] RewriteCond %{REQUEST_URI} !check_auth [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+) [NC] RewriteRule ^ https://%1%{REQUEST_URI} [R=302,L] # NB: rewrite rule back-references ($N) are to the RewriteRule pattern # NB: rewrite rule back-references (%N) to the last matched RewriteCond pattern
Ive previously shown that relative and absolute hyperlinks seem to work fine, as well as explicit http:// hyperlinks to the local site, which seem to get re-mapped anyway. In other words, ...
<a href="somepage.html"> <a href="/somepage.html"> <a href="http://somepage.html">
...all seem to be processed correctly, even without the above rewrite. The above rewrite is really only to help customers arrive at the right page.
The remaining question is: what happens if we try to display an image from an http:// source, e.g.
<IMG SRC="http://bcra.org.uk/graphics/bcra100_maponly_fuzzy.gif">
That worked OK, but its from a local server. Let's try something from outside, which doesnt have an https version...
Image Tests | Image Tests | Image Tests | Image Tests |