Copied to clipboard

Flag this post as spam?

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


  • Bilal khan 35 posts 58 karma points
    Feb 18, 2015 @ 18:04
    Bilal khan
    0

    Umbraco 7 MVC Request pipeline removing .aspx from the URL

    Hi,

    I developing 301 redirects on old URL to point to new ones. I am using Umbraco Request piple and when the page is not found I am trying to check if the URL has to be redirected. 

     

    I am using an XML file to hold new and old URL's. One URL that I am redirecting has .aspx in it but when I try to get the absolute path for the url .aspx is removed  from it not sure where Umbraco is removing it below is the rquested URL

    abc.com/help/faq.aspx?dsid=568

    and when I try to get absolute uri.path I end up with somthing like below

    abc.com/help/faq?dsid=568

    .aspx is removed I need this so I can compate the whole requested URL with the URL's in my xml file.

     

    Any idea on why this is happenening.

     

    Many thanks

    Ad

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 18, 2015 @ 22:39
    Jan Skovgaard
    0

    Hi Adnan

    In the web.config there is an umbraco specific key named "umbracoUseDirectoryUrls" - This should be changed from "True" to "False". This will bring back the .aspx extension to the urls.

    You might also need to go to the /config/umbracoSettings.config file and change the

    I don't know if the 301 url tracker package might be possible for you to use as well for this scenario - It might be worth checking it out here https://our.umbraco.org/projects/developer-tools/301-url-tracker

    Hope this helps.

    /Jan

  • Bilal khan 35 posts 58 karma points
    Feb 19, 2015 @ 11:21
    Bilal khan
    0

    Hi - Thank you for your reply. I have tried both and recycled my app pool but it didn't work. I am thinking of taking the .aspx extenion from the XML file containing the old URL. 

     

    As I have wasted enough time trying to figure this out. Thanks for your reply!

  • 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