Danny Web
Danny Web

Reputation: 281

Umbraco UrlReWrite

I wanna setup a URL ReWrite in my Umbraco Setup and after couple of hourse of trial and errors still stucked. Hope I can get a help from you guys here.

I want to urlrewrite so links to older pdf files been redirect to an umbraco page.

I have tried creating the following but it doesnt work, it just return standard IIS 404 page.

<add name="PDFs" virtualUrl="~/oldpdfs/*.pdf" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="/MyCustom404Page.aspx" redirectMode="Permanent" ignoreCase="true" />

Why it's not working for me? Any suggestion?

Upvotes: 1

Views: 877

Answers (1)

ProNotion
ProNotion

Reputation: 3692

Perhaps try this:

<add name="PDFs" virtualUrl="~/oldpdfs/(.*).pdf" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="/MyCustom404Page.aspx" redirectMode="Permanent" ignoreCase="true" />

Upvotes: 1

Related Questions