Redirect failed paths to the uppermost accessible directory