I try to use IIS rewrite outbound rules at the IIS where some of website have it implemented successfully.
So I created a simple rule to replace the word "test" with "123456".
And I am getting this error
500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed.
Web.config
<system.webServer>
<!--<urlCompression dynamicCompressionBeforeCache="false" /> -->
<urlCompression doStaticCompression="false" doDynamicCompression="true" dynamicCompressionBeforeCache="false" />
It seems like if I add any (just ANY) oubound rule the website craches. I mean that the pattern of the rule doesnt have impact but the rule itself liek an entry.
Any clue?
P.S. Should I install URL Rewrite Module 2.0 coz it seems like I have installed the old version... Will it solve the issue?
P.S. I did some extra changes but it doesn't work at all.
< urlCompression doStaticCompression="false" doDynamicCompression="false" dynamicCompressionBeforeCache="false" / >
I have asked about this issue here as well https://forums.iis.net/t/1226401.aspx?Outbound+rule+is+giving+500+error+for+the+entire+website
When done on the server level it is saved in the ApplicationHost. config file. You can also define it on the folder level, it that case it is saved in a web. config file inside that folder.
The URL Rewrite module lets you translate search engine-friendly URLs into a format that your application currently uses. Also, it lets you create redirect rules that can be used to redirect search engine crawlers to clean URLs.
For outboundRules use like below details..
On the machine running the web site, from the command line run:
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0
You may need to follow this up with an iisreset
<urlCompression doStaticCompression="false" doDynamicCompression="true" dynamicCompressionBeforeCache="false" />
<rewrite>
<rules>
<rule name="InboundFriendlyAboutUs" stopProcessing="true">
<match url="^about-our-car-finance$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="page.aspx" />
</rule>
</rules>
<outboundRules>
<rule name="Outbound1" preCondition="IsHtml">
<match filterByTags="A, Form" pattern="^(.*)About-Us\.aspx$"/>
<action type="Rewrite" value="{R:1}about-our-car-finance"/>
</rule>
<preConditions>
<preCondition name="IsHtml">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html"/>
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With