Copied to clipboard

Flag this post as spam?

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


  • Nicolás Lope de Barrios 21 posts 42 karma points
    Jun 15, 2010 @ 22:50
    Nicolás Lope de Barrios
    0

    Hidding xslt folder from navigation

    Sometimes umbraco shows the name of the xslt file when an error occurs, displaying the path to it. Then, you can access the file by just simply copying it and pasting its path in the address bar of the browser.

    Is there a way to hide the /xslt/ folder (and its content) from navigation? It would be useful for other folders too.

    We are running umbraco on Windows Server 2008 R2 and SQL Server 2008, .NET 3.5.

     

    thanks,

    Nico.

  • Nicolás Lope de Barrios 21 posts 42 karma points
    Jun 15, 2010 @ 23:32
    Nicolás Lope de Barrios
    0

    Will it work if I add it to the umbracoReservedPaths in the web.config?

  • Nicolás Lope de Barrios 21 posts 42 karma points
    Jun 15, 2010 @ 23:37
    Nicolás Lope de Barrios
    0

    No, it didn't. (sorry)

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jun 15, 2010 @ 23:52
    Peter Dijksterhuis
    0

    You could configure IIS so that it does not serve raw xslt-files I guess

    If people would try to access it directly, it would then throw a 404.

    Peter

  • Tim 1193 posts 2675 karma points MVP 3x c-trib
    Jun 16, 2010 @ 01:50
    Tim
    0

    You can add some code to your web.config file to forbid direct access to anything with the .xslt extension (note, if using IIS6 or IIS7 in classic mode you will need to map the .xslt extension to asp.net). The code you add is:

    <add path="*.xslt" verb="*" type="System.Web.HttpForbiddenHandler" validate="True" />

    Which goes inside the <HttpHandlers> section of your web.config file. If you try and access .xslt files directly on the site, it'll throw a HTTP Forbidden Error.

    Hope that helps!

Please Sign in or register to post replies

Write your reply to:

Draft