Haroldo
Haroldo

Reputation: 37377

how can i reference $_SERVER['DOCUMENT_ROOT'] in a .htaccess file?

How can i reference the document root from within an htaccess file?

ie:

i currently have

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**' the root path

Upvotes: 4

Views: 1028

Answers (2)

NullUserException
NullUserException

Reputation: 85478

You won't need to have an absolute path if the file in question is in PHP's include_path

Upvotes: 1

m1tk4
m1tk4

Reputation: 3477

You cannot. Apache configuration files do not support this.

Upvotes: 5

Related Questions