: What might be causing my site's pages to load more slowly in these IIS Rewrite Module rules? I have the following IIS rewrite rules that work exactly as I wish on both my development and
I have the following IIS rewrite rules that work exactly as I wish on both my development and live servers within an Orchard CMS website, though when enabled, seriously slow the site's page loads. This is easily tested by enabling/disabling the rules to notice the performance decrease, which appears to accrue (i.e. not one rule more than others).
As these are the first rules I've ever created, I imagine there may be some obvious pitfalls, though my research hasn't lead me to discover any.
So simply put, what might be causing the slowdown in my page load times (...perhaps order?):
<rewrite>
<rules>
<rule name="www to non-www" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.(.*)$" />
</conditions>
<action type="Redirect" url="http://{C:1}/{R:0}" redirectType="Permanent" />
</rule>
<rule name="Dont Process Any Further" enabled="true" stopProcessing="true">
<match url="^(about-us$|contact$|copyright$|privacy$|terms$|book$|surroundings$|
Admin|Media|Themes|Modules|Core|Users|Orchard|source
)" />
<!-- Match url, Line (1): user specific. Line (2): app specific -->
<action type="None" />
</rule>
<!--When root/url requested, goto _domain_index-->
<rule name="Rewrite - Root Hit Redirect" enabled="true">
<match url="^$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^(www.)?brun.azurewebsites.net" negate="true" />
<add input="{HTTP_HOST}" pattern="^(www.)?brun.com" negate="true" />
<add input="{HTTP_HOST}" pattern="^(www.)?(.*).com" />
</conditions>
<action type="Rewrite" url="_{C:2}_index" />
</rule>
<!--Note: the first pattern in this rule stops the *possible* above rules URL
being rewritten again i.e _domain_index to _domain__domain_index, whilst
also allowing 'View' links from Orchards Dashboard to work-->
<rule name="Rewrite - /page to /_domain_page" enabled="true">
<match url="^(.*)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<!--<add input="{REQUEST_URI}" pattern="/_([a-zA-Z]+)_index$" negate="true" />-->
<add input="{REQUEST_URI}" pattern="/_([a-zA-Z]+)_([a-zA-Z]+)$" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{HTTP_HOST}" pattern="^(www.)?brun.azurewebsites.net" negate="true" />
<add input="{HTTP_HOST}" pattern="^(www.)?brun.com" negate="true" />
<add input="{HTTP_HOST}" pattern="^(www.)?(.*).com" />
</conditions>
<action type="Rewrite" url="_{C:5}_{R:1}" />
</rule>
</rules>
</rewrite>
More posts by @Mendez628
1 Comments
Sorted by latest first Latest Oldest Best
From past experience I think you may find that the issue will be memory related and not precisely related to the rewrite rules per-say. What I have found in the past, although I can't find it documented anywhere is that IIS heavily depends on the system memory to perform URL rewriting, I believe it has something to do with caching the rules. If this is the problem it may be a simple case of provisioning additional memory to the server for IIS to use.
There is also a known memory leakage to do with IIS rewrite rules which I recall but can't place my hands on the documentation at this time for, although there was an update made available for it. If this is the case it should be able to be fixed by updating IIS to the latest version along with all updates, service packs, and hotfixes, one of which I do recall added functionality to clean up the internal cache.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.