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.
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
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!
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
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
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!
is working on a reply...