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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

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

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

HELP!!! Rewrite on IIS 6 :(

Go to End

5 Posts   4942 Views


Community Member, 1 Post

31 December 2009 at 11:06am

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!



Community Member, 54 Posts

17 February 2010 at 9:50am

Edited: 17/02/2010 9:51am

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.


Forum Moderator, 922 Posts

26 October 2010 at 11:36pm

Edited: 29/10/2010 3:11pm

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:



Community Member, 65 Posts

16 June 2011 at 7:33am


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



Forum Moderator, 5523 Posts

18 June 2011 at 4:00pm

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