Copied to clipboard

Flag this post as spam?

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


  • Brian Andersen 35 posts 66 karma points
    Apr 21, 2013 @ 17:25
    Brian Andersen
    0

    URL rewrite challenge

    Hi
    I am runnning umbraco 4.9.1 on .NET 4.0.
    I am trying via the UrlRewriting.config  to create a rule that can do the following:
    When someone opens "www.myurl.com/somewords" they should see this URL "www.myurl.com/mypage.aspx?id=1234" where I handle "somewords" by my costum logic.
    But only if the URL is "www.myurl.com/somewords" not if i enter "www.myurl.com/someotherword.aspx should this rewrite happen.
    All the examples i find are the other way around. Anyone know a nice place to find these regular expressions or have done something simular? 
    Best
    Brian
  • Comment author was deleted

    Apr 22, 2013 @ 21:35

    we do something like this:

    <add name="petrolstation" virtualUrl="^~/petrolstation/feed/" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/regions/americas/more/company/news-rss.aspx?lang=en&amp;nodeID=9243" ignoreCase="true" xmlns="" />

    but it assumes users are visiting:  mydomain/pretrolstation/feed/ when on the backend they are really visiting:

    /regions/americas/more/company/news-rss.aspx?lang=en&nodeID=9243

     

     

Please Sign in or register to post replies

Write your reply to:

Draft