Help with ManagedFusionRewriter configuration

1
Can anyone help with configuring Managed Fusion Rewriter for Mendix on IIS. I have a external URL set up as, for example, http://www.mywebserver.com/ess/index.html and wish to rewrite this to http://localhost:8088/index.html Note that the Mendix web folder is mapped to a virtual directory (ess) off my main website, so I need to remove this part of the url. I have tried the following: RewriteEngine On RewriteCond %{QUERY_STRING} ^(.+)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^ui RewriteCond $1 !^forms RewriteCond $1 !^mxclientsystem RewriteCond $1 !^widgets RewriteRule ^/ess/?(.*) http://localhost:8088/$1?%1 [P,L,R] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^ui RewriteCond $1 !^forms RewriteCond $1 !^mxclientsystem RewriteCond $1 !^widgets RewriteRule ^/ess/?(.*) http://localhost:8088/$1 [P,R] This doesn't seem to work. None of the examples I can find for this seem easy to follow. Edit: I have moved the bin directory (containing the ManagedFusion.Rewriter.dll) from the root of the Mendix web folder to the web server root folder and it now seems to try to load the application, but I get an error with status 404 like: Error when loading url Tickets/launchpad.mxf: Unable to load forms/en_US/Tickets/launchpad.mxf?634763980177283109 status:404 So that looks like the rewriter might be working? I have tried changing permissions on all files in the Mendix web folder to give IUSR_xxx read/script permissions, but I still get a 404. Any ideas? Edit 2: I really don't understand these rules. The ! in the RewriteCond lines above excludes urls matching that pattern, so in the documentation here the example configuration given excludes anything in the ui, forms, mxclientsystem and widgets directories, which is not what's needed. I finally got things nearly working by using: RewriteEngine On RewriteCond %{QUERY_STRING} ^(.+)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/ess/?(.*) http://localhost:8088/$1?%1 [P,L,R] RewriteRule ^/ess/?(.*) http://localhost:8088/$1 [P,R] The only issue I have is that the rewrite does not work as expected if you enter http://www.mywebserver.com/ess/ instead of http://www.mywebserver.com/ess/index.html Even though index.html is defined as a default page type in IIS, it doesn't work with the redirect and you get a 404 error. So, does anyone know how to overcome this issue where no file name is specified?
asked
1 answers
1

This should work. However, the IIS folder 'ess' has to be an application, not a virtual directory. In IIS, right-click on this folder and choose 'Convert to application'. The bin directory (containing the ManagedFusion.Rewriter.dll) must be in the root of the Mendix web folder.

We are currently improving the rules given in the How-to. We will update the How-to when a new version is ready.

answered