[Typo3-dev] Bug in .htaccess?

Martin-no$pam-Kutschker "Martin-no$pam-Kutschker" at blackbox.n0spam.net
Thu Apr 29 17:34:14 CEST 2004



Martin-no$pam-Kutschker wrote:
> 
> 
> Steffen Mueller wrote:
> 
>> On 04/29/04 17:03 Martin-no$pam-Kutschker wrote:
>>
>>>
>>>> Anyway, I don't like this example since it uses abolute paths. Still 
>>>> not perfect ;-)
>>>
>>> How would you do it in a VirtualHost directive? I can create rewrite 
>>> rules, but it usually takes me some time, mostly spent on reading the 
>>> rewrite log :-(
>>>
>> Hi.
>>
>> I don't see any need to add /src/www/ to the REQUEST_FILENAME path in 
>> your RewriteCond, as it always checks full path.
>> See mod_rewrite doc:
>> REQUEST_FILENAME = The full local filesystem path to the file or 
>> script matching the request.
> 
> 
> Yeh so it says, but that's not just the way it happens. Trust me, I've 
> had it without the path, it didn't work. After debugging with the 
> rewrite log I figured it was NOT the filesystem path. I didn't 
> investigate further.

Just by accident I happend to read the realURL docs and look what I've 
found:

: Alternatively, you could include the following lines in your
: httpd.conf, probably in the VirtualHost-section:
:
: RewriteEngine On
: RewriteRule ^/typo3$ - [L]
: RewriteRule ^/typo3/.*$ - [L]
: RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
: RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
: RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l
: RewriteRule .* /index.ph

Seems to be the answer of my questions.

No Typo3 can be shipped with default rules for Location AND VirtualHost 
directives :-)

Masi





More information about the TYPO3-dev mailing list