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

Windows install fails due to .htaccess RewriteBase \

Go to End

2 Posts   4142 Views


Community Member, 3 Posts

25 January 2009 at 4:20pm

I've seen a lot of people with Windows installation problems. Just downloaded Silverstripe myself and ran into one, with a proposed fix. Is there an IRC channel or somewhere to talk with developers?

Anyway, I'm installing with an existing Apache 2.2 on WindowXP, not WAMP. I'm using an Apache VirtualHost directive so the URL is:

http://silverstripe.mysite.localhost instead of http://mysite.localhost/silverstripe

It crashes Apache after writing the .htaccess file. On restart and reload of install.php I get an error message like:

[alert] [client] C:/mysite/silverstripe/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context, referer: http://silverstripe.mysite.localhost/install.php

The .htaccess file has the following line:

RewriteBase \

which I believe needs changed to:

RewriteBase /

In the install.php file I see the following:

function createHtaccess() {
$start = "### SILVERSTRIPE START ###\n";
$end = "\n### SILVERSTRIPE END ###";
$base = dirname($_SERVER['SCRIPT_NAME']);
if($base != '.') $baseClause = "RewriteBase $base\n";
else $baseClause = "";

I think the problem is that Windows is returning a backslash for dirname(), where it needs a forwardslash. (see

I propose the following possible fix:

$base = dirname($_SERVER['SCRIPT_NAME']);
+++ if($base == '\') $base = '/';
if($base != '.') $baseClause = "RewriteBase $base\n";
else $baseClause = "";


Community Member, 3 Posts

25 January 2009 at 4:44pm

Hmm... that doesn't seem to take care of the problem