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

IIS7.5 w/ URL Rewrite - Installer confirms requirements but URL Rewrite fails during install


Reply

6 Posts   3543 Views

Avatar
weareorganism

10 February 2012 at 10:38am Community Member, 14 Posts

Lots of posts on this but most seem to fix .htaccess issues so I felt obligated to add another

I'm bound to an IIS server with my client and have had the folks at Rack.io (the hosting provider) install the URL Rewrite module for IIS. The installation checks report that everything is good but during the installation progress I get the following:

Friendly URLs are not working. This is most likely because a rewrite module isn't configured correctly on your site. You may need to get your web host or server administrator to do this for you:
- mod_rewrite or other rewrite module is enabled on your web server
- AllowOverride All is set for the directory where SilverStripe is installed

Does "AllowOverride All" apply to IIS installs?

Can anyone suggest next steps for me to troubleshoot?

Thanks!
Peter

Avatar
biapar

13 February 2012 at 8:19am Forum Moderator, 435 Posts

Are there the rules into web.config?

Avatar
weareorganism

13 February 2012 at 8:27am Community Member, 14 Posts

Hi biapar,

Yes, the following is written to web.config during the install:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
   <system.webServer>
      <security>
         <requestFiltering>
            <hiddenSegments applyToWebDAV="false">
               <add segment="silverstripe-cache" />
            </hiddenSegments>
         </requestFiltering>
      </security>
      <rewrite>
         <rules>
            <rule name="SilverStripe Clean URLs" stopProcessing="true">
               <match url="^(.*)$" />
               <conditions>
                  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
               </conditions>
               <action type="Rewrite" url="sapphire/main.php?url={R:1}" appendQueryString="true" />
            </rule>
         </rules>
      </rewrite>
   </system.webServer>
</configuration>

Is there a way to override the friendly URL check to see if it does indeed work but is reporting errors by mistake?

Thanks,
Peter

Avatar
biapar

13 February 2012 at 10:34am Forum Moderator, 435 Posts

Is module enabled? Have you see if in IIS control panel there is url rewriting configuration?

I run a lot of SS installation on IIS7.5 and I don't have problems.

Avatar
weareorganism

14 February 2012 at 4:21am Community Member, 14 Posts

Hi biapar,

The module is enabled and appears in the IIS control panel.

Do you know if I can override the check and see if it will work?

Peter

Attached Files
Avatar
biapar

24 February 2012 at 10:59am Forum Moderator, 435 Posts

Try this:

<system.webServer>
      <security>
         <requestFiltering>
            <hiddenSegments applyToWebDAV="false">
               <add segment="silverstripe-cache" />
            </hiddenSegments>
         </requestFiltering>
      </security>
      <rewrite>
         <rules>
            <rule name="SilverStripe Clean URLs" stopProcessing="true">
               <match url="^(.*)$" />
               <conditions>
                  <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
               </conditions>
               <action type="Rewrite" url="sapphire/main.php?url={R:1}" appendQueryString="true" />
            </rule>
         </rules>
      </rewrite>
   </system.webServer>