Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

step by step instruction: SSL for certain pages only

Go to End

3 Posts   768 Views


Community Member, 7 Posts

6 March 2014 at 7:43pm

Hi there,

I used SS2.4.10 for a shop and now have the problem that I would like to get only the login and checkout pages SSL secured.

I tried different suggestions in various forums
(, (unfortunately the documentation mentioned is not available anymore), (fatal error),, and

I even called my host to ask if they have installed the php-xml extention which was suggested in one thread.

As it is my first time to use SSL I asked the hosting support where to upload my files as I assumed I have to upload them into httpsdocs, but they asked me to upload them only into httpdocs.
Can this be right? (If not, do I have to upload all files into this directory?)

Now, I simply have no idea how to get this SSL working on these two pages.

Is there anybody who can give me a step by step instruction how to get this done?


Any hints why the above forum links didn't help me???

Any help is really appreciated!


Forum Moderator, 1849 Posts

8 March 2014 at 3:41am

Without reading the above the method I use is in the Page::init() to check for certain URL patterns (or page classes) and if they match then I force the redirection to https at that point. Works for me for many years and is very simple.


Community Member, 7 Posts

8 March 2014 at 1:17pm

Edited: 08/03/2014 1:18pm

Hi swaiba,

thank you for that. How do you force it? Do you use Director::forceSSL(); ?

I tried this, but I get a "404 Not found The requested URL /checkout/checkoutstep/orderformaddress/ was not found on this server."

Does that mean I have to upload the files to the httpsdocs? Or what could be the reason for this?