How can I refer to $ _SERVER ['DOCUMENT_ROOT'] in the .htaccess file?

How can I reference the document root from the htaccess file?

t

Currently

php_value auto_prepend_file  C:/wamp/www/hf_latest_desktop/prepend.php

but I would like

php_value auto_prepend_file  **AUTO_DOC_ROOT**prepend.php

where '** AUTO_DOC_ROOT **' is the root path

+3
source share
2 answers

You can not. Apache configuration files do not support this.

+5
source

You do not need to have an absolute path if this file is in PHP include_path

+1
source

Source: https://habr.com/ru/post/1527062/


All Articles