Copied to clipboard

Flag this post as spam?

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


  • Brett Spencer 55 posts 209 karma points
    Aug 10, 2017 @ 19:30
    Brett Spencer
    0

    Help! Need to have a text file read directly under Domain

    A marketing management tool requires this to be done TODAY!!!

    I did this once, somehow, a long time ago. Don't remember how.

    I was able to tell Umbraco to show the file (url management).

    How can I do this? ---- I don't really need to edit inside of Umbraco!

    http://mydomain.com/accesstextfile.txt

  • Nik 503 posts 1977 karma points
    Aug 10, 2017 @ 20:08
    Nik
    100

    Hi Brett,

    The easiest way to do this might be to put the file name in the reserved urls list in webconfig. It is under appSettings, you could add you file in there like this:

    <add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd, ~/accesstextfile.txt" />
    

    Nik

  • Brett Spencer 55 posts 209 karma points
    Aug 10, 2017 @ 20:45
    Brett Spencer
    0

    This is the solution BUT I had to remove the first few entries as they were throwing a YSOD.

    Thank you Nik you saved alot of our #$$&#.

  • Nik 503 posts 1977 karma points
    Aug 10, 2017 @ 20:46
    Nik
    0

    No problem, you probably had issues with the code I posted because it was from a v7 install not a v4 :-)

  • Nicholas Westby 1649 posts 5403 karma points c-trib
    Aug 10, 2017 @ 20:19
    Nicholas Westby
    0

    Does it actually have a ".txt" extension? I have had no issue putting text files in the website. They just work. Just put them on the file system where your website is located.

  • Brett Spencer 55 posts 209 karma points
    Aug 10, 2017 @ 20:25
    Brett Spencer
    0

    Yes, .txt - Trying to get Niks solution to work right now.

    Bear in mind, this is version 4!

Please Sign in or register to post replies

Write your reply to:

Draft