[Typo3-dev] Bug in .htaccess?
Andreas Schwarzkopf
a.schwarzkopf at meinsystem.de
Thu Apr 29 11:40:57 CEST 2004
Martin-no$pam-Kutschker schrieb:
> I'm using this in a httpd.conf:
>
> RewriteEngine On
> RewriteRule ^typo3$ typo3/index_re.php [L]
> RewriteCond /srv/www/%{REQUEST_FILENAME} !-f
> RewriteRule ^/[^/]*\.(html|pdf)$ /index.php [L]
>
> That is I do the typo3 check first. The other changes are due the fact
> that rewriting in the conf file and a .htacces has to be done
> diferrently. Perhaps not the file makes the difference, but the Apache
> tag. In httpd.conf my rules are within a VirtualHost directive (and not
> a Location).
So I think the universal correct version for .htaccess file located in
the web root would be:
RewriteEngine On
RewriteRule ^typo3$ /typo3/index_re.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^[^/]*\.(html|pdf)$ /index.php
- the backend rule is on first place and is the last one if it affects,
so we don't spend much resources for further conditions
- both rules are with an appended slash, so it works on windows and all
linux configurations (I hope)
- if an HTML or PDF file does not exist, the index.php is launched.
don't know about pdf - it is a not "official" extension, so it could
be done also without it, like the old way.
Andreas
More information about the TYPO3-dev
mailing list