This project is read-only.

Using IIS URL Rewrite in Sites.{tenant}.config

Topics: Administration, Core, Customizing Orchard, General, Installing Orchard, Writing modules
May 7, 2014 at 10:03 PM
How can i use Sites.{tenant}.config to create IIS URL Rewrite rules?
I need tenant specific rewrite rules very very much. I must manage at least 70 tenants. How can create for example Canonical Host Name Rule for every one separately?
I know that there is rewrite module in gallery but i worry about performance of running it on every tenant. Also it is difficult to manage for all tenants separately.
Please help me. please!
May 7, 2014 at 10:07 PM
For example i need some rule similar to the following for every tenant. But if i write this in main web.config effect on all tenants.
                <rule name="CanonicalHostNameRule1">
                    <match url="(.*)" />
                        <add input="{HTTP_HOST}" pattern="^www\.domain\.com$" negate="true" />
                    <action type="Redirect" url="{R:1}" />
May 8, 2014 at 1:26 AM
I have no idea what Sites.{tenant}.config is, but the rewrite module is the only option you have if you don't want to or can't use plain IIS rewrites. Before worrying about performance, you should try it and profile it.