Elgg on IIS 7

I have installed IIS 7 with PHP Support and MySQL.  I copied the Elgg on the website and created .htaccess.  I can load elgg main installation page and connect to database. Next page where I enter all the default website information, when I hit next it doesn't go any further. 

I tried adding rules to the web.config but that's throwing errors in regular expressions.

Any direction would be helpful!

Thank You

  • I assume that you know that only Apache is officially supported, right?



  • People are running Elgg on IIS from what I've heard. I don't know any of the details for changing the mod_rewrite rules to work with it.

  • I've heard on/ off similar regarding IIS/WinServer2008 and lower versions. We recently acquired new Win2008Server, but have not yet tried Elgg on that box. I would be interested in more techie comments re: Elgg + WinServers.. b/c soon enough we *will setup Elgg on the new Win2008 box ;-) a llittle bit very different from good ole Linux..

  • Yes I am running Elgg on IIS 7 (Windows 7). The rules you tried to add in the web.config threw errors in the regular expressions because IIS doesn't need an escape character for the underscore. Replace all instances of /_ with _ in each regular expression and you should be good. I have added instrutions on how to get Elgg running on IIS if you're just starting out.

      1) Install the IIS URL Rewrite module: http://www.iis.net/download/urlrewrite

      2) Open the IIS Manager in Control Panel > Administrative Tools

      3) Right-Click on your Elgg site and select "Switch to Features View" if not already there.

      4) Open the URL Rewrite Feature and click "Import Rules..." in the actions menu.

      5) Browse for a configuration file... Open the "htaccess_dist" file located in the root directory of your elgg site.

      6) Rename each rule if you desire to do so by right clicking on the rule name in the Tree View. This is optional. I renamed my rules "Action Handler, Service Handler, Export Handler1, etc..."

      7) Under each rule there is a match tag. The tags contain regular expressions. Most regular expressions will generate an error because IIS is interpreting them differently than Apache would. There is a simple fix. In every instance you see "/_" remove the slash. It is an escape character for the underscore. This isn't necessary for IIS and will generate an error. Be sure to remove it anytime you see it before the underscore.

      8) In the actions menu on the right, hit apply.

    That's it! Elgg should now work on IIS.

  • @DaWolf - can I correct you please? Im my imported htaccess file, I saw no /_, but 7 instances of \_

    When I replaced \_ with _ then it worked.