Copied to clipboard

Flag this post as spam?

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


  • Bruno Olsen 75 posts 316 karma points
    Aug 01, 2017 @ 07:44
    Bruno Olsen
    0

    7.6.1: UrlRewriting.config seems not to work

    Hi

    I'm trying to do some seo-friendly urls but I'm having a bit of trouble. I found that I couldn't get UrlRewriting.config to work on this installation, so I tried another approach which went even worse :)

    So, the build in URL tracker is disabled, Url Tracker is installed - and those things usually doesn't interfere with the use of UrlRwriting.config.

    I was wondering, since the file didn't even come with the download, is UrlRewriting.config not supported anymore?

    Neither

    <add name="JobCodeRule"
        virtualUrl="^~/test/(.*)"
        destinationUrl="~/test/?age=$1"
        rewriteUrlParameter="ExcludeFromClientQueryString"
        ignoreCase="true" />
    

    nor

    <add name="umb2new"
       redirect="Domain"
       ignoreCase="true" rewriteUrlParameter="IncludeQueryStringForRewrite"
       virtualUrl="http://somedomain/test/"
       redirectMode="Temporary"
       destinationUrl="http://somedomain/testing/" />
    

    works. The later is just to see if redirects I know SHOULD work actually does.

    Kind regards, Bruno

  • james 37 posts 121 karma points c-trib
    Aug 01, 2017 @ 08:37
    james
    100

    Hi Bruno,

    UrlRewriting.net was removed from 7.6 - it's slow and wasn't being maintained. You can use the IIS URL rewrite module which is much more efficient and should be able to handle your rewrite rules.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Aug 01, 2017 @ 08:43
    David Brendel
    1

    Hi Bruno,

    is it a fresh install of Umbraco? Then the UrlRewritting.Net is indeed removed.

    If it was an update from a previous v7 version it should still be there as it will not get deleted.

    But even then I would also suggest to switch to the IIS Rewrite Module if possible.

    Regards David

  • Bruno Olsen 75 posts 316 karma points
    Aug 01, 2017 @ 08:48
    Bruno Olsen
    0

    Hi James and David

    Ok, thanks :) I'll try the IIS Rewrite Module :)

    Kind regards, Bruno

  • Bruno Olsen 75 posts 316 karma points
    Aug 01, 2017 @ 09:07
    Bruno Olsen
    0

    Hi again

    Got it working :)

         <rewrite>
            <rules>
                <rule name="JobRewrite">
                    <match url="^test/([0-9]+)" />
                    <action type="Rewrite" url="test/?age={R:1}" />
                </rule>
            </rules>
         </rewrite>
    

    in the system.webServer segment of web.config :)

    Kind regard, Bruno

  • 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