Archive
SilverStripe Forums » Archive » HTTPS mode and IIS
Our old forums are still available as a read-only archive.
| Go to End | Next > | |
| Author | Topic: HTTPS mode and IIS | 133474 Views |
-
HTTPS mode and IIS

5 December 2007 at 6:33am
Just noticed Director.php it was using this to check for HTTPS mode:
isset($_SERVER['HTTPS'])
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.
-
Re: HTTPS mode and IIS

5 December 2007 at 10:11am
You can merely have $_SERVER['HTTPS'] == "on"
because the second expression will require the first expression to be true anyway
-
Re: HTTPS mode and IIS

5 December 2007 at 11:03am
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.
-
Re: HTTPS mode and IIS

5 December 2007 at 11:18am
Sam,
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.
[ISAPI_Rewrite]
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] -
Re: HTTPS mode and IIS

5 December 2007 at 11:21am
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
if(!isset($_SERVER['REQUEST_URI'])){
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
} -
Re: HTTPS mode and IIS

5 December 2007 at 11:42am
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 http://doc.silverstripe.com/doku.php?id=iis-installation. It would be good if you could provide some installation instructions, if you have time.
-
Re: HTTPS mode and IIS

5 December 2007 at 12:13pm
Sam,
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.
-
Re: HTTPS mode and IIS

25 January 2008 at 4:54pm
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
| 133474 Views | ||
| Go to Top | Next > |



