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

[Resolved] 301 Problem with New Install


4 Posts   576 Views


17 July 2012 at 8:31pm Community Member, 5 Posts

A design / branding agency developed a SS theme / template for us, which I'm trying to get going on our (IIS) webserver so we can start adding real content.

(The webserver was already running PHP and MySQL).

I unzipped the SS content in a new folder under wwwroot, created the MySQL database and imported the tables from an SQL export file. I created a new web site in IIS, pointing to the new folder, set the default document to index.php, so far so straightforward.

When I navigate to to the new site (say the whole thing stuggles mightily, I don't see any SS theme just the raw conntent and logs show me a whole bunch of 301 errors for various SS files (like CSS etc.)

However, if I create a virtual folder on the site and point it to the same location with an alias (e.g. sssite), then navigate to that location (say, it all appears to work as intended.

Is there some config somewhere that might be causing the 301s?



18 July 2012 at 11:54am Community Member, 5 Posts

Looking at this again with my head on straight this morning, I can see that the 301 comes from attempts to locate stuff like:


Suggesting, perhaps, that the URL rewriting needs some work. How does one set that up for IIS?


18 July 2012 at 12:23pm Community Member, 5 Posts

Ok bizzareness - I guess I don't really understand what PHP is doing with the non-.htaccess rewriting.

Looking at the source of the pages that do work vs the same page when it doesn't work, I see it filled with things like:

<link rel="stylesheet" type="text/css" href="" />

<link rel="stylesheet" type="text/css" href="" />

To me, they both seem like incorrectly formed hrefs (with a file name in there?)


18 July 2012 at 1:05pm Community Member, 5 Posts

Following on from this:

I found it WAS a rewrite problem, I was mising the following rules from web.config:

<clear />
<rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions logicalGrouping="MatchAll">
<add input="{REMOTE_ADDR}" negate="true" pattern="" />
<add input="{URL}" pattern="*.ss" />
<action type="CustomResponse" statusCode="403" />
<rule name="SilverStripe Clean URLs" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<action type="Rewrite" url="sapphire/main.php?url={R:1}" appendQueryString="true" />