Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Edgar Rasquin 326 posts 925 karma points
    Feb 23, 2021 @ 09:33
    Edgar Rasquin
    0

    Hi there,

    I need to redirect URLs with .html endings:

    /de/testpage.html

    I installed Simple 301 package an created the following entry:

    enter image description here

    Instead of beeing redirected I get a 404.0 - Not Found HTTP error.

    Does anyone know why and what to do?

    Thanks

  • Edgar Rasquin 326 posts 925 karma points
    Feb 23, 2021 @ 15:56
    Edgar Rasquin
    0

    I have altered the web.config with the following line:

    <add name="UmbracoBaseMappingHtml" path="*.html" verb="*" type="umbraco.BasePages.BasePage" resourceType="Unspecified" preCondition="integratedMode" />
    

    Now I don't get the 404 error any more. Instead it shows an empty HTML page.

    ¯\(ツ)

  • Edgar Rasquin 326 posts 925 karma points
    Feb 23, 2021 @ 16:20
    Edgar Rasquin
    0

    Found the solution here:

    http://amdonnelly.blogspot.com/2011/02/301-redirects-for-html-files-in-umbraco.html

    Basically what I was missing was an entry in the /config/UrlRewriting.config where I had to add the following line so that all HTML page will be recognised .net calls and can be dealt with by Umbraco and the redirect package:

    <add destinationurl="/$1.aspx" ignorecase="true" name=" HTML redirect " rewriteurlparameter="ExcludeFromClientQueryString" virtualurl="^~/(.*).html"> 
    

Please Sign in or register to post replies

Write your reply to:

Draft