Extension, Plugin

Developer
Supported

Force SSL

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From EpicVoyage

     

You must be logged in to post.

URL rewriting question/issue

General

Christian M.
Christian M.

First a brief description of my situation and then my question.  I have header and footer templates that get embedded into my other pages which link to CSS and JS files for use throughout the site.  The CSS files were being linked to via: href=”{site_url}css/1/style.css” (and JS files similarly).  About half of the pages on the site will need to use SSL and the other half not use it. 

I had hoped that this add-on would write the results of the {site_url} variable to use HTTPS for those pages I used the {exp:force_ssl} template on.  However, it isn’t writing the URLs causing browser complaints of insecure content on my SSL intended pages. 

I have implemented a fix (though I think it is a bit kludgy) to get around this issue.  I was curious though if this add-on is supposed to rewrite URLS as I hoped it would.  I tried a number of things including wrapping my CSS and JS sections with the {exp:force_ssl:rewrite} template pair, but with no luck.  Suggestions on a way to accomplish my needs without a kludgy fix or suggestions about what I’m doing wrong (or could do differently) would be appreciated.

Christian M.
# 1
Christian M.

I found a better option for URL rewriting which includes the templated URLs (such as {site_url} and other auto-generated URLs in ExpressionEngine).  Turns out the ‘https support’ addon does this quite nicely.  I’m still using Force SSL to force certain pages to be SSL or not, so it’s not a total loss.