If I have an .htaccess file in a given directory within my website, and want to specify an ErrorDocument relative to the .htaccess file, NOT relative to the document root, is this possible?
Something like: ErrorDocument 404 $CURRENT_DIRECTORY/404.php
While a number of directives are sensitive to relative directory while within an
.htaccess
or<Directory>
context,ErrorDocument
is not. Per the documentation:You could create a "master" 404.php that's used for all 404s, then within that file include the specific 404.php using a path determined by the request, an environment variable (set with SetEnv), etc.