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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

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

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

2.3x on IIS/Isapi_Rewrite


Go to End


3 Posts   3183 Views

Avatar
ABailey

Community Member, 8 Posts

19 December 2008 at 4:26pm

Edited: 19/12/2008 4:28pm

We've been using the 2.2x series SS with great success on IIS /w Isapi Rewrite (v3x). Looking towards the future of SS and all the modular upgrades in the works we are looking to upgrade to the 2.3x series SS.

Having a problem getting the /admin to load. Initially it would display the login form (/Security/login), and after entering the information and submitting, would display the sapphire/main.php?url=admin& and then bomb out on 23+ javascript errors. Looking at the generated HTML the system just isn't firing properly and prototype.js isn't being included in the <script> series.

Considering the exact same release (12/18/2008 trunk) works perfectly fine on Apache/Linux, there must be a problem with either the ISAPI_REWRITE or IIS.

Has anyone had success in fixing or at least determining the problem at hand? I'm about to go back to tackling it now.

Avatar
ABailey

Community Member, 8 Posts

23 December 2008 at 5:03pm

One possible clue I've discovered is Isapi_Rewrite sends a modified REQUEST_URI (and cloned REQUEST_URL) to the web server, is this how the module tricks IIS into serving the proper page?

There are several places in the code that reference REQUEST_URI and expect it to be '/admin' and not '/sapphire/main.php?url=/admin&'

Tried adding:
$_SERVER['REQUEST_URI'] = '/'.$url;

into the main.php in the Apache rewrite rules area when $_GET['url'] exists, didn't seem to help there, but I'd imagine it would help in other places.

Avatar
Sam

Administrator, 690 Posts

8 January 2009 at 1:41pm

Hi ABailey,

Can you put print_r($_SERVER); at the top of main.php, then visit the page and post its output to this forum thread? I'd like to see in more detail the values that IIS/ISAPI_REWRITE generates.