Is there an easier way to debug IIS Url Rewrite configurations than this?:
Debug and troubleshoot rewrite rules easily
One of the very cool features of URL Rewrite Module is its integration with IIS Failed Request Tracing. When you have rewrite rules that do not work the way you expect them to work - enable Failed Request Tracing and you will get the entire history of how rewrite rules were applied on the requested URL. I use Failed Request Tracing all the time and it has proven to be a great help when debugging and troubleshooting rewrite rules.
I was able to solve my problem with this info, but it was not really easy to use when you have a complex configuration.
We will create a rewrite rule by using URL Rewrite UI in IIS Manager. To do this, follow these steps: Go to IIS Manager. Select Default Web Site. In the Feature View click URL Rewrite. In the Actions pane on the right-hand side, click Add rules….
To do this, follow these steps: Go to IIS Manager. Select Default Web Site. In the Feature View click URL Rewrite. In the Actions pane on the right-hand side, click Add rules… In the Add Rules dialog box, select Blank Rule and click OK.
Select Default Web Site. In the Feature View click URL Rewrite. In the Actions pane on the right-hand side, click Add rules… In the Add Rules dialog box, select Blank Rule and click OK. Now you must define the actual rewrite rule. In the URL Rewrite Module, a rewrite rule is defined by specifying four required pieces of information:
TracingURLRewrite One of the very cool features of URL Rewrite Module is its integration with IIS Failed Request Tracing. When you have rewrite rules that do not work the way you expect them to work - enable Failed Request Tracing and you will get the entire history of how rewrite rules were applied on the requested URL.
Whilst some may say "that's as good as it gets", I'd say that's a pretty neat way to debug rewrite rules. You have full visibility into the pipeline and can see exactly what is happening at each step. I have used this many times to resolve rewrite rule problems. It just takes practice to get familiar with the FRT tool.
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