I am using urlrewriting to to redirect .aspx links/urls to sites without the extension.
but the problem is that all urls generated by niceurl (and locallink for that matter) all have the .aspx extension.
I know of using "replace" to find and replace ".aspx" with "nothing" so to speak (which works) but that is quite the task to replace EVERY niceurl in every xslt file and i am sure there is an easier solution because i dont think im the only one who had this problem before.
oh how stupid i feel now... i was 100% certain i had already done that and believed it didnt work. Well thank you for pointing me in the right direction, i feel a bit silly now.
One last question: The urls have a trailing slash, is it possible to remove them as well? (my urlrewriting rule removes trailing slash and .aspx)
<!-- this will add a trailing slash (/) to urls when in directory url mode --> <addTrailingSlash>false</addTrailingSlash>
which, WOULD seem like is the final solution i need but it looks like it does nothing. (note it was set to true before i modified it to what it is above)
Removing aspx from niceurl generated links
hopefully this is a quick solution:
I am using urlrewriting to to redirect .aspx links/urls to sites without the extension.
but the problem is that all urls generated by niceurl (and locallink for that matter) all have the .aspx extension.
I know of using "replace" to find and replace ".aspx" with "nothing" so to speak (which works) but that is quite the task to replace EVERY niceurl in every xslt file and i am sure there is an easier solution because i dont think im the only one who had this problem before.
Setting 'umbracoUseDirectoryUrls' to 'true' in the web.config should sort that out? Or does that not work for local links?
oh how stupid i feel now... i was 100% certain i had already done that and believed it didnt work. Well thank you for pointing me in the right direction, i feel a bit silly now.
One last question: The urls have a trailing slash, is it possible to remove them as well? (my urlrewriting rule removes trailing slash and .aspx)
No worries :-)
As for the slash I've also wondered the same.. I'm not sure how to do it myself though.
Well there is this in umbracoSettings.config:
which, WOULD seem like is the final solution i need but it looks like it does nothing. (note it was set to true before i modified it to what it is above)
Maybe you need to restart the site?
yup that worked :) thanks for the help
is working on a reply...