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.

Installing SilverStripe

Getting SilverStripe up and running on your computer and on your web server.

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

HELP!!! Rewrite on IIS 6 :(


5 Posts   3956 Views


31 December 2009 at 11:06am Community Member, 1 Post

Hi Everyone!

I´ve had always use Apache + PHP + MySQL for Silverstripe.
Now, I need to mount a new Site on a IIS6 +PHP + MySQL server.
PHP + MySQL works fine.
The problem I have it's Rewrite Conditions on IIS.

I've tried with Ionics Isapi Rewrite Filter and ISAPI_Rewrite 2, but I didn´t have lucky.

Does anyone work with this before?
I need a tutorial, step by step please!

Thanks a lot!



17 February 2010 at 9:50am (Last edited: 17 February 2010 9:51am), Community Member, 54 Posts

It can be done, I have it working just fine

Once you have IIRF (version 2) installed use the following ini in your silverstripe directory.

# IIRF.ini
# Rewriting ON (on by default)
RewriteEngine ON

# Status local only - add 'RemoteOK' for remote debugging
StatusUrl /iirfStatus

# Log
RewriteLog C:\Inetpub\Log\IIRF.log
RewriteLogLevel 1

RewriteEngine On
MaxMatchCount 10
IterationLimit 5

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

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

I vaguely recall editing the base url in index.php but I cannot remember if this is necessary. My base url is:

// This is the URL of the script that everything must be viewed with.


26 October 2010 at 11:36pm (Last edited: 29 October 2010 3:11pm), Forum Moderator, 921 Posts

I've confirmed this and SilverStripe works with IIRF on Windows Server 2003 R2 using IIS 6. I also used PHP 5.3.3 and MySQL 5.1.51.

Unit tests pass, even:

cd C:\Inetpub\wwwroot\ss24
php sapphire\cli-script.php dev/tests/all

851 tests run: 851 passes, 0 fails, and 0 exceptions
Maximum memory usage: 80.2M

Total time: 124.351 seconds

124 seconds for a full pass isn't bad for an older copy of Windows! For performance, it's also important you update everything on Server 2003, including .NET Framework updates and service packs (important!). Then you can use a VC9 non-thread safe version of PHP and the latest MySQL 5.1.51. I installed my copy of PHP manually, as well.

Not only that, but the /admin URL is working correctly. The main thing is you need to create a new "vhost", which means creating a new entry under "Web Sites" in IIS 6, pointing it to a location in C:\Inetpub\wwwroot\silverstripe (or the directory you want) then putting an Iirf.ini file into that directory for rewriting to work.

I've got the start of a step-by-step tutorial, which also explains how to install FastCGI and PHP on Windows Server 2003, so I'll finish that up and post it on

EDIT: Guide available here:



16 June 2011 at 7:33am Community Member, 65 Posts


I need to host a ss site, which works perfectly well on both my localhost and a Linux shared hosting package i have, on a windows server. It's 2003 with IIS6 and IIRF 2.1.

I have tried everything but still can't get the site to see the css, js or any image files. All the text is there and the navigation works, you can click between pages without a problem and you don't need to add index.php. In fact if you add index.php it comes back with 'page not found'. This is the same if I try entering the file path of any image or css file directly into my browser.

Any suggestions would be greatly received.

Many thanks



18 June 2011 at 4:00pm Forum Moderator, 5511 Posts

Marc - what are the paths to your css being rewritten as in the html?