Copied to clipboard

Flag this post as spam?

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


  • shanem 39 posts 93 karma points
    Apr 12, 2011 @ 11:29
    shanem
    0

    URL Rewrite to /Base for RSS

    Hello I need some help on rewriting any /rss URL to /base/BaseHelper/RssHandler/Id. I can get it to rewrite with the config setting below but it redirects so my URL isn't /rss but /base/BaseHelper/RssHandler/Id. Any help please:

     

        <add name="rssredirect"

          virtualUrl="/rss$"

          redirect="Application"

          rewriteUrlParameter="ExcludeFromClientQueryString"

          destinationUrl="/base/BaseHelper/RssHandler/1080"

          ignoreCase="true" />

     

    If I remove redirect="Application" I get 404 error.

  • Kim Nedergaard 37 posts 144 karma points
    Apr 12, 2011 @ 11:33
    Kim Nedergaard
    0

    Hi Shanem   

     <add name="rssRedirect"
         virtualUrl="^~/rss/(.*)"
         rewriteUrlParameter="ExcludeFromClientQueryString"
         destinationUrl="~/base/BaseHelper/RssHandler/$1"
         ignoreCase="true" />

    I think this would work :)

  • shanem 39 posts 93 karma points
    Apr 12, 2011 @ 12:01
    shanem
    0

    Thanks for the reply! That doesn't seem to work it takes me to the 404 page. I want all URLs ending in /rss to redirect to /base/BaseHelper/RssHandler/1080 but still have /rss at the end of the URL. I don't need to pass parameters from the virtualURL to the destinationUrl.

Please Sign in or register to post replies

Write your reply to:

Draft