Documentation
-
1. Getting Started
To get started with Managed Fusion Url Rewriter you need to add the following to your web.config file.
<configSections> <sectionGroup name="managedFusion.rewriter" type="ManagedFusion.Rewriter.Configuration.ManagedFusionSectionGroup, ManagedFusion.Rewriter"> <section name="rules" type="ManagedFusion.Rewriter.Configuration.RulesManagerSection, ManagedFusion.Rewriter"/> </sectionGroup> </configSections> <managedFusion> <rules fileName="ManagedFusion.Rewriter.rules" rebaseClientPath="false" rewriteFormPostBack="true" /> </managedFusion>For IIS 5/6:
<system.web> <httpModules> <add name="RewriterModule" type="ManagedFusion.Rewriter.RewriterModule, ManagedFusion.Rewriter"/> </httpModules> </system.web>For IIS 7:
<system.webServer> <modules> <add name="RewriterModule" type="ManagedFusion.Rewriter.RewriterModule, ManagedFusion.Rewriter"/> </modules> </system.webServer>- And add the following files to your web application /bin directory.
- ManagedFusion.Rewriter.dll
- ManagedFusion.Rewriter.pdb
- And create a rules file named 'ManagedFusion.Rewriter.rules' (which is just a plain text file) If you are converting your Apache rules over from .htaccess then you just need to copy everything between the <IfModule mod_rewrite.c> ... </IfModule> tags in your .htaccess file.
2. Available Rules
All the following rules defined at http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html are supported.
- RewriteBase
- RewriteCond
- RewriteEngine
- RewriteRule
- RewriteLog
- RewriteLogLevel
3. Enabling Extension-less pages in IIS 5/6
If you want to use Managed Fusion Url Rewriter without specifying the extension of your URLs, you can do so by adding a new application mapping to your website IIS settings.
** This solution works only if your website is using ASP.NET server pages and not mixing with other dynamic server pages such as ASP and PHP.
note: if you use server built in to Visual Studio or IIS 7 you do not need to follow these directions.
The following instructions apply for IIS 5.
- Open IIS and right-click on the website and select 'properties'.
- Click the 'Configuration' button under Application Settings section
- Click the 'Add' button to create a new application mapping
- Set the executable textbox to aspnet_isapi.dll file location. for .net 2.0, 3.0, 3.5:
- C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
- Set the extension textbox to .* to map extension-less URLs and custom extensions to the ASP.NET ISAPI Process.
- Make sure the checkbox 'Check that file exists' is not checked.
- Press 'OK' to confirm and close all the windows.
The following instructions apply for IIS 6.
- Open IIS and right-click on the website and select 'properties'.
- Click the 'Configuration' button under Application Settings section
- Click the 'Insert...' button to create a new wildcard mapping
- Set the executable textbox to aspnet_isapi.dll file location.
for .net 2.0, 3.0, 3.5:
- C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll
- Make sure the checkbox 'Verify that file exists' is not checked.
- Press 'OK' to confirm and close all the windows.