We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14883 ☆ A M B ☆
    • 450 Posts
    I’m trying to write a snippet for my Error resource that will redirect to a particular custom resource determined by parsing the REQUEST_URI that triggered the error.

    What I’d like to do is take that original (bad) REQUEST_URI, and try and find the first valid "parent resource". For example, if "/myfolder/foo/bar/bad.htm" was the error URI, but "/myfolder/foo/bar/" was a real/valid resource, then "/myfolder/foo/bar/" is what I’d like to return.

    What I think I need, then, is the API method for determining whether a given string is a valid resource alias. And if it is, I need the resource ID so I can work with that resource.