Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto debug URL Rewrite Configurations on IIS

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.

like image 585
Yots Avatar asked May 30 '11 23:05

Yots


People also ask

How do I create a URL Rewrite rule in IIS?

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….

How do I change the default URL in IIS?

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.

How do I rewrite the URL of a default web site?

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:

Does url rewrite module integrate with IIS failed request Tracing?

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.


1 Answers

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.

like image 186
Kev Avatar answered Sep 30 '22 20:09

Kev