I need to serve up securely a single page ("friendly-page-name") on a MODX (Evo) site. This htaccess entry
RewriteCond %{SERVER_PORT} !^443
RewriteCond %{REQUEST_URI} friendly-page-name
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
seems to do the trick in a test environment.
However, in IE I get dialog box messages saying I’m about to leave the secure connection. I think these messages are triggered by pulling in images and stylesheets that have relative references, e.g. in the css
background-image: url(../images/header.gif);
Can anyone point me to the correct htaccess entry that would force these to be served up securely as well? Or am I likely missing something altogether? I guess I would like to get the above htaccess entry to read something like "this page and all relative links called from it or on it should be redirected to https".
The other question I had is : is there a way to change this entry to reference the doc id yet for it to work with FURLs, such that I don’t need to worry about someone renaming the page?
In the event it might matter, eventually, this page will have an eForm call on it to submit a form. But hopefully no external links.
Any thoughts, advice, corrections, etc. etc. would be gratefully accepted! Obviously, I’m no rewrite expert!!
TIA,
Matt