~/link redirection to SysSiteAssets

Vote:
 

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 

http://mysite/link/5cf2418dc6df409db7a32e4566a1ab36.aspx?id=12345&epslanguage=nb-NO

    
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:

http://world.episerver.com/Forum/Developer-forum/-EPiServer-75-CMS/Thread-Container/2013/12/Upgrade-has-turned-my-home-page-into-SysSiteAssets/

 

Also when the same url is used but added in front of it any uppercase letter, for example:

http://mysite/link/X5cf2418dc6df409db7a32e4566a1ab36.aspx?id=12345&epslanguage=nb-NO

    
Automatically redirects to

http://mysite/SysSiteAssets/global/main/item/test-image.jpg/

and works as expected.

 

 

 

#85868
May 07, 2014 15:03
Vote:
 

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:

<location path="Link">
  <system.webServer>
    <handlers>
      <remove name="EcfCatalogHandler"/>
      <add name="LinkHandler" verb="*" path="*.aspx" preCondition="integratedMode" type="My.Web.VppRedirectHttpHandler, My.Web" />
    </handlers>
  </system.webServer>
</location>

    

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?

#85900
May 08, 2014 10:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.