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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Hosting Requirements /

What you need to consider when choosing a hosting provider and plan.

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

I would love to see more info/support for IIS


Go to End


9 Posts   7114 Views

Avatar
cheekygeek

Community Member, 6 Posts

19 December 2008 at 4:25am

Like many people, my preference is Linux/Unix for hosting/servers but I'm trapped working in a Windows Server environment. There are also a lot of IIS 5 and IIS 6 servers still out there. I'd like to see more instructions for installation that are IIS-specific (that included recommendations for the best way to install PHP and run SilverStripe on it. (for example, changes to the php.ini file like whether one should, or should not, turn on auto_detect_line_endings).

In particular, we need a good (free) way to handle the rewrite stuff. I think that the IIRF looks like it should work, but since it uses its own .ini file instead of reading the .htaccess files, we need some regex guru to translate the rules that SilverStripe needs (writes in the .htaccess file) and translate it into the IIRF instructions in the .ini files. (Example .ini files are here, including one for Joomla). If someone can provide one for SilverStripe, I'll bet they will include a link on their site to it also.

This would open up SilverStripe to all sorts of additional potential users.

Avatar
Sam

Administrator, 690 Posts

19 December 2008 at 12:53pm

Hi cheekygeek,

We are working on this. We've started with the latest version of IIS - 7.0 - because it has much better support for PHP, as well as a Microsoft-distributed rewrite engine.

The IIRF ini file looks pretty similar to a .htaccess file; if anyone manages to get a working replacement for our standard .htaccess they should post it to the iis-installation wiki page.

cheekygeek, if you want to attempt this, feel free to post back here asking for help :-).

Avatar
Sigurd

Forum Moderator, 628 Posts

6 January 2009 at 3:41pm

cheekygeek, I'm assuming you looked at the alternatives mentioned at http://doc.silverstripe.com/doku.php?id=iis-installation ?

To reiterate with Sam, if you do come up with the .ini answers, please add them as a comment on the wiki page above, as that is the reference page for installing on IIS.

Avatar
gingercat

Community Member, 7 Posts

8 January 2009 at 4:00pm

I am thinking IIRF is probably the best option for older servers as well. BUT like everyone else I have failed to get the rewrite rules working correctly so far.

SS works great on our WAMP test server but our production server is IIS6 and our linux server is offshore and appears to be pretty slow for SS.

Avatar
Stephan

Community Member, 55 Posts

22 January 2009 at 8:56am

Edited: 22/01/2009 8:59am

I just managed to get Silverstripe 2.2.3 work on IIS6.0.
With the help of Helicon ISAPI Rewrite (like mentioned in the installation guide).

But one strange thing happend:
The base url was changed to https !

I finally found out what the problem is:
In sapphire/core/control/director.php
The function protocolAndHost checks the presence of $_SERVER['HTTPS'].
But this is always available on IIS 6.0.
If no SSL is running, it has the value "off".
Ass a quick an very dirty hack I just skipped this line (258) and
and added $s = ''; and now it works.
Of course I have to find a better solution.
I just wanted to let you know.

CU Stephan

Avatar
Sigurd

Forum Moderator, 628 Posts

22 January 2009 at 9:13am

Edited: 22/01/2009 9:13am

Stephan the HTTPS issue is fixed in the upcoming SS 2.3.0... you can find the changeset at http://open.silverstripe.com if you really need it.

Avatar
ricpersi

Community Member, 3 Posts

5 August 2009 at 4:21am

I agree with gingercat.. I'd really love to see a configuration file for IIRF (http://iirf.codeplex.com).
It shouldn't be too hard to implement, or is it? I had a try with it but got not too far. Hopefully
someone with more IIRF knowledge will help us.

Best regards,

Riccardo

Avatar
kcd

Community Member, 54 Posts

5 November 2009 at 10:13am

Edited: 05/11/2009 10:15am

Hey all. I did this recently so give this code a go and let me know if you run into any problems.

IsapiRewrite4.ini


# IsapiRewrite4.ini
# 5-11-2009

# Status for debugging
#StatusUrl /iirfStatus RemoteOK

# Log
RewriteLog C:\[somewhere for the log file]\silverstripeiirf
RewriteLogLevel 1

RewriteEngine On
MaxMatchCount 10
IterationLimit 5

# Rewrite for SEO friendly urls for SilverStripe

# URLs with query strings
# Don't catch successful file references
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\?(.+)$ /sapphire/main.php?url=$1&$2 [L,I]

# URLs without query strings
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /sapphire/main.php?url=$1 [L,I]

Easy as that.

I also did fun things with redirects and subdomains. Hope it works for you.

Go to Top