Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    Mar 27, 2015 @ 18:46
    Matt Taylor
    0

    Urlrewriting working but it's showing the rewirtten Url in the browser!

    I've created a simple url rewrite rule in UrlRewriting.config that take a fake url like

    http://www.mysite.com/destination-guides/uk-scotland/england/

    and turns it in to this one with an alternative templete

    http://www.mysite.com/uk-scotland/england/?alttemplate=destinationguide

    <add name="DestinationGuideRewrite" 
              virtualUrl="^~/destination-guides/(.*)/"
              rewriteUrlParameter="ExcludeFromClientQueryString"
              destinationUrl="~/$1?alttemplate=destinationguide"
                    ignoreCase="true" />

    Funtionally it working but rather than displaying the fake url http://www.mysite.com/destination-guides/uk-scotland/england/ in the browser's address bar it is showing the rewritten one, http://www.mysite.com/uk-scotland/england/?alttemplate=destinationguide which I don't want and according to my understanding it is not supposed to do.

    I'm sure it used to work before and I'm not sure why it isn't now.

    Any ideas of what to look at?

    Regards, Matt

     

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Mar 28, 2015 @ 09:28
    Dave Woestenborghs
    0

    Hi Matt,

    Haven't used urlrewriting.net in a while anymore. We use IIS now for rewriting.

    But just to be sure can you add the following attribute to your rule 

    rewrite="None"

    Dave

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Mar 28, 2015 @ 17:50
    Alex Skrypnyk
    0

    It's strange, you have to see http://www.mysite.com/destination-guides/uk-scotland/england/ in the bttowser window.

  • Matt Taylor 873 posts 2086 karma points
    Mar 29, 2015 @ 11:45
    Matt Taylor
    0

    Thanks Dave,

    Are you sure rewrite="None" is valid? I cannot find it documented and when I appended it to the rule it just results in a config error.

    I'm using Umbraco 7.2.1 by the way.

    Regards,

    Matt

  • Matt Taylor 873 posts 2086 karma points
    Mar 29, 2015 @ 12:10
    Matt Taylor
    100

    I've discovered the problem is caused by the SEO Checker package which has it's own Url Rewriting functionality.

    I'll have to figure out the best course of action.

    Thanks for your inputs.

    Regards, Matt

Please Sign in or register to post replies

Write your reply to:

Draft