Forum Moderators: bakedjake
------------------------------------------
# URL OK -> donīt rewrite further
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ $1 [NC,L]
# recognise Index-Site
RewriteCond %{REQUEST_FILENAME}/c/index\.php -f
RewriteRule ^(.*)$ /c/index\.php [NC,L]
# extract filename
#RewriteRule ^(.*)\.html$ $1 [S=1]
#RewriteRule ^(.*)\.php$ $1
#try .php-Version of file (when called with .html extension)
#RewriteCond %{REQUEST_FILENAME}.php -f
#RewriteRule ^(.*)$ $1.php [L]
# fast access like
# www.example.com/musik instead of
# www.example.com/dc/musik.php
RewriteCond /dc/%{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ /dc/$1\.php [NC,L]
# Full search-cgi, when nothings fits
RewriteRule ^(.*)$ [example.com...] [L]
----------------------------------------------
OK. Thatīs my idea. When I tried it I get a few very strange errors:
1. fast access doesnīt work (404-error)
2. try .php doesnīt work (404-error)
3. very strange: Fulltext-Search works, but if I access a site that exists, it will load completely and after that starts the MS Debugger with an "syntaxerror in line 1"-Message. even more strange: When I add some stupid RewriteCond like
RewriteCond %{REQUEST_FILENAME} -f
before the RewriteRule-Line the code works - but the fulltext-search doesnīt work any more ;).
I tried a RewriteCond like
RewriteCond %{REQUEST_FILENAME}!-f
and the syntaxerror was back again.
can anyone help me?
David
[edited by: heini at 3:50 pm (utc) on Oct. 2, 2003]
[edit reason] examplified [/edit]