After VPP migration tool is run, html code that is rendered as:
<img alt="Test image" class="" src="/link/5cf2418dc6df409db7a32e4566a1ab36.aspx?id=12345&epslanguage=nb-NO" />
is rewritten to:
<img alt="Test image" class="" src="/SysSiteAssets/global/main/item/test-image.jpg/">
And works as expected.
But directly accessing
results in HTTP 404 response.
Have I have done something wrong with VPP migration tool or there is something else?
There is something similar here:
Also when the same url is used but added in front of it any uppercase letter, for example:
Automatically redirects to
and works as expected.
As it turns out problem was EPiServer Commerce StaticCatalogUriHandler:
<add name="EcfCatalogHandler" verb="*" path="*.aspx" preCondition="integratedMode" type="Mediachase.Commerce.Website.Handlers.StaticCatalogUriHandler, Mediachase.Commerce.Website" />
It tried to process all *.aspx requests, obviously.
So what I did is following, modified VppToContentRedirectModule given in:http://world.episerver.com/Documentation/Items/Upgrading/EPiServer-CMS/75/Migrating-VPP-based-files-to-the-new-media-system/
So that VppRedirectHttpHandler is public and added following section for Link location in web.config where commerce handler is removed and this is uesed instead:
<add name="LinkHandler" verb="*" path="*.aspx" preCondition="integratedMode" type="My.Web.VppRedirectHttpHandler, My.Web" />
By doing so redirects work as I expected them to work
Any opinions on solution I made?
Could I have broken something for episerver itself by doing it this way?