Link to home
Start Free TrialLog in
Avatar of Brad Bansner
Brad Bansner

asked on

IIS URL Rewrite causes infinite loop

I wrote a simple URL Rewrite rule for the IIS URL Rewrite component. It is working, but there is also a weird infinite loop thing going on when I load the page.

We don't have a certificate on this domain, so to load the URL you have to add an exception to your browser.

Here is my test URL:
https://ephoton.domain-group.com/catalog/123/Category-Title

Here is my web.config file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
	<system.webServer>
		<httpErrors errorMode="Detailed" />
		<rewrite>
			<rules>
				<rule name="catalog">
					<match url="^catalog/([0-9]+)/([_0-9a-z-]+)" />
					<action type="Rewrite" url="catalog.htm?id={R:1}&amp;cat={R:2}" />
				</rule>
			</rules>
		</rewrite>
	</system.webServer>
</configuration>

Open in new window


Is there something wrong with my rule?

The resulting page should show the two values I am trying to capture:
ID=123
Cat=Category-Title

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of Snarf0001
Snarf0001
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Brad Bansner
Brad Bansner

ASKER

Doh! Thank you so much. Sometimes it just takes another set of eyes.