We have our URL rewrite as followed. I tested the pattern in IIS 8.5 URL Rewrite and the patterns matched as what we wanted. However, it's 404 every single time. Will someone take a look and see what is wrong with my URL rewrite? Thank you.
URL: devbox.mysite.com/article/how-to-use-onedrive
Pattern: (.*)/article/(.*)$
Action Rewrite URL: {R:1}/article/?artID={R:2}
Currently the page shows 404. Below is the XML code in web.config file.
<rule name="Article-rewrite" enabled="true">
<match url="(.*)/article/(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="{R:1}/article/?artID={R:2}" appendQueryString="false" />
</rule>
Try this:
I've removed the domain from the match url, as you're not switching the domain.