I am using intelligencia urlrewriter and I want to redirect all urls which are not ending with .aspx or .html to some page of web application but not able to figure out regex pattern required for it. I have tried pattern
Do you have to use Intelligencia
UrlRewriter? Or IIS rewrite rules would also be OK? Seems like you are trying both...
If you can use IIS rewrite rules, then you can negate the whole regex pattern, for example:
<rule name="Test" stopProcessing="true"> <match url="^.*\.(html|aspx)$" negate="true" /> <action type="Redirect" url="/" appendQueryString="false" /> </rule>
Regex to match all URLs not ending with .aspx or .html
I haven't tested it on Intelligencia