Copied to clipboard

Flag this post as spam?

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


  • Michaël Vanbrabandt 863 posts 3343 karma points c-trib
    Mar 29, 2018 @ 17:10
    Michaël Vanbrabandt
    0

    Redirect .aspx urls to url without .aspx

    Hi all,

    Someone that has a redirect rule for redirecting urls with .aspx extension to the url without?

    When using the UrlRewriting.config in previous versions, we used:

    <add name="SEO | Trim .aspx for directory URLs"
            redirect="Application"
            redirectMode="Permanent"
            virtualUrl="^/(?![0-9]+.aspx)(?!umbraco/)([^\?]*?).aspx$"
            rewriteUrlParameter="ExcludeFromClientQueryString"
            destinationUrl="/$1/"
            ignoreCase="true" />
    

    But when I try to use this in my IIS 8, it also converts Umbraco .aspx pages which I don't want.

    Anyone that can help me out here?

    Thanks!

    /Michaël

  • Dave Woestenborghs 3325 posts 11170 karma points MVP 5x admin c-trib
    Mar 31, 2018 @ 08:20
    Dave Woestenborghs
    100

    Hi Michaël,

    We use the rewrites defined in this article on almost all of our projects :

    https://24days.in/umbraco-cms/2014/redirect-rules/

    This handles most of your seo rewrites. Like stripping .aspx

    Dave

  • Michaël Vanbrabandt 863 posts 3343 karma points c-trib
    Mar 31, 2018 @ 08:37
    Michaël Vanbrabandt
    0

    Hi Dave,

    thanks for the link! Didn't know about the disabling of the 301 redirect caching in browsers!

    Seems I am not the only one here on the community! ;)

    /Michaël

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies