[Typo3-dev] Bug in .htaccess?

Michael Stucki mundaun at gmx.ch
Thu Apr 29 14:07:48 CEST 2004


Hi Andreas,

> I have deactivated the realURL stuff by default and moved it higher. If
> you have not installed this extension, all images and styles are not
> found (?)

Well, as you see, I didn't test my tweaks... ;-)
Can you please look at the Apache logfile to see how the path has been
generated?

> --- cut new final ---
> [...]

> # uncomment this if you use RealURL: 
> # If the file/symlink/directory does not exist => Redirect to index.php
> #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
> #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
> #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l
> #RewriteRule .* index.php                        [L]

Can you please try this again after changing these lines like this:

--- cut ---
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
--- cut ---

Btw, I think it would be better if we removed the [L] tag (it's not needed
anymore) plus modify the RewriteRule to make sure that it only rewrites
*.html, *.pdf, etc. (can be changed, of course):

--- cut ---
RewriteRule .*\.(html|pdf)$ index.php
--- cut ---

> # main rewrite rule
> RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
> RewriteRule   ^[^/]*\.html$  index.php

If my above statement works, we should never get to that place. So we can
remove this again. But please check it, first.

> [...]
> --- cut new final ---

Regards - michael
-- 
Want support? Please read the list rules first: http://typo3.org/1438.0.html




More information about the TYPO3-dev mailing list