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.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

HTTPS mode and IIS

Go to End

24 Posts   134923 Views


5 December 2007 at 6:33am Community Member, 5 Posts

Just noticed Director.php it was using this to check for HTTPS mode:


Had to change it to:

isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on"

Because my IIS $_SERVER['HTTPS'] variable is equal to "off", which pass the issset test.


5 December 2007 at 10:11am Forum Moderator, 628 Posts

You can merely have $_SERVER['HTTPS'] == "on"

because the second expression will require the first expression to be true anyway


5 December 2007 at 11:03am Administrator, 679 Posts

Minh - we haven't worked much with IIS to its encouraging to hear that you have had success in getting SilverStripe working. How did you tackle URL rewriting?

PS: Please don't take Sig's suggestion - it would cause an E_NOTICE level error if $_SERVER['HTTPS'] isn't set. Your code is good. :-)


5 December 2007 at 11:18am Community Member, 5 Posts


I'm using the ISAPI_FILTER for mod_rewrite. Here's my .htaccess code incase anyone needed it. I couldn't figure out the second condition so I left it out for now and just add additional file extension to the first condition.

RewriteEngine On
RewriteBase /silverstripe_root_directory_name/
RewriteCond $1 !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.swf)|(\.html)|(\.php)$
RewriteRule ^(.*)$ sapphire/main.php?url=$1&%{QUERY_STRING} [L]


5 December 2007 at 11:21am Community Member, 5 Posts

Another thing that I had to do is set $_SERER['REQUEST_URI'] because that server env doesn't exist in IIS. Here's a bit of code that I've added at the top of /sapphire/main.php



5 December 2007 at 11:42am Administrator, 679 Posts

Minh - are you familiar with downloading SilverStripe via subversion and then using subversion to create a patch file? It's a good way of discovering *all* of the little changes that you needed to make in order to get SilverStripe working on IIS.

I've started a short page about IIS installation at [url][/url]. It would be good if you could provide some installation instructions, if you have time.


5 December 2007 at 12:13pm Community Member, 5 Posts


I can help with the IIS installation documentation. But applying svn patch would not be possible because I don't have direct access to the Windows box that's hosting the site. So I couldn't get tortoise svn going. Unless you could think of another way.


25 January 2008 at 4:54pm Community Member, 1 Post

where can we have a free version of helicon? is there any open source. Hoping that anyone success to install and get working with silver stripe on IIS, would write a complete how-to page

Go to Top