Copied to clipboard

Flag this post as spam?

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


  • Paul A 133 posts 368 karma points
    Sep 15, 2011 @ 11:07
    Paul A
    0

    Trailing slash / directory URLs / umbracoReservedPaths

    Hi,

    We have some short URLs that seem to have stopped working... We occasionally add in directories (outside of Umbraco) and drop in a default.aspx with a redirect line of code. e.g.

    www.mywebsite.com/handyURL

    IIS problem? Web.config problem? Umbraco config problem?

    www.mywebsite.com/handyURL/ works.

    www.mywebsite.com/handyURL/default.aspx works.

    www.mywebsite.com/handyURL doesn't work (anymore).

    I've check IIS, the default document on directories is correctly set up. I've checked web.config, umbracoReservedPaths has the handyURL listed there.

    Cheers for any help,

  • Rich Green 2246 posts 4008 karma points
    Sep 15, 2011 @ 11:44
    Rich Green
    0

    Hey Paul,

    Not a direct answer to your question, but there's an easier way to achieve what you're doing (if I understood you correctly)

    If you add a DocType property of 'umbracoUrlAlias' you can simply add any number of URL's the content you want to display, this means your client can add/edit them too.

    So within the node you want the short url to show, simply enter the url into the value of 'umbracoUrlAlias', this must be lowercase and without the .aspx extension in your case. You can have multiples separated by commas, so something like

    /handyurl, /anotherhandyurl, /etcetc

    Rich

  • Paul A 133 posts 368 karma points
    Sep 15, 2011 @ 16:15
    Paul A
    0

    Hi,

    I managed to kill our website by doing that ... (it initially looked v promising and did work)... long story...

    Anything else I can try with current set up? Foreign folders with default.aspx in that have redirect code. Have tried adding all sorts to web.config but none seem to work:

    <add key="umbracoReservedPaths" value="/dir,/dir/,~/dir,~/dir/

    Same problem -> /dir doesn't work (umbraco page not found).... /dir/ works fine.

    Cheers,

  • Rich Green 2246 posts 4008 karma points
    Sep 15, 2011 @ 16:23
    Rich Green
    1

    Hey Paul,

    Strange, something must be a little off as umbracoUrlAlias has been built in for as long as I remember.

    2 possible solutions

    1) Try setting <addTrailingSlash>false</addTrailingSlash> to true in /config/umbracoSettings.config

    2) Force all url's to have trailing slashes, have a look here http://umbraco.miketaylor.eu/2010/11/03/url-rewriting-and-seo/

    Rich

  • Paul A 133 posts 368 karma points
    Oct 04, 2011 @ 11:04
    Paul A
    0

    Cheers, I'd tried some of the above but had no luck. For some reason, adding dir names to umbracoReservedUrls seemed to get that working. Strange because it was all working before with them listed in umbracoReservedPaths.

    http://our.umbraco.org/forum/ourumb-dev-forum/bugs/8281-umbracoReservedPaths-trailing-slash

Please Sign in or register to post replies

Write your reply to:

Draft