[TYPO3-dev] getIndpEnv('TYPO3_DOCUMENT_ROOT') problems when using mod_rewrite in httpd.conf (Apache)
Michael Stucki
michael at typo3.org
Thu Aug 24 13:48:15 CEST 2006
Hi Martin,
I will have a look at it.
- michael
> Did I break my httpd.conf or are here only true believers of .htacess?
>
> I usually disable .htaccess in Apache and would like to stick to that
> principle.
>
> Martin Kutschker schrieb:
>> Hi!
>>
>> getIndpEnv() tries to determine the DOCUMENT_ROOT from SCRIPT_FILENAME
>> and SCRIPT_NAME. This works in .htacess like this:
>>
>> URL: http://host/base/abc/def
>>
>> SCRIPT_NAME /URL_base/index.php
>> SCRIPT_FILENAME /file/system/base/index.php
>>
>> But in httpd.conf the situation is like this:
>>
>> SCRIPT_FILENAME /file/system/base/index.php
>> SCRIPT_NAME /URL_base/abc/def
>>
>> Now SCRIPT_NAME shows the real URL, and only SCRIPT_FILENAME reflects
>> the file system path.
>>
>> The result is a broken TYPO3_DOCUMENT_ROOT. It simpyl is empty because
>> both variable has have no "common end".
>>
>> The code in getIndpDev has this note that some webserver configs "will
>> deliver a 'wrong' DOCUMENT_ROOT (according to our description)". But it
>> doesn't tell what "our description" is. DOCUMENT_ROOT is in both
>> versions correct. That is it simply shows the configured DOCUMENT_ROOT
>> of the webserver.
>>
>> Perhaps the function can be modified to use DOCUMENT_ROOT as a fallback
>> if its normal operation results in an empty string.
>>
>> Masi
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-dev
mailing list