I'm writing the rewrite stuff for a wiki and this is what I currently do:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) /wiki.pl?$1
This works fine - images and other files which actually exist are uneffected while other requests are taken care of by the wiki.
But we also want to store non-wiki-related stuff on the server, so I came up with the idea to have non-wiki URIs prepended by a "nowiki" (while not actually storing it in a nowiki-directory).
I added
RewriteRule ^nowiki/(.+) $1 [L]
but it just strips the nowiki and then sends it to the wiki. Shouldn't the [L]-flag prevent that? What am I doing wrong here?
We have folders named the same as wiki pages, and this is how I want it to be:
http://handgranat.org/sandra <- should take me to the wiki page named sandra
http://handgranat.org/nowiki/sandra <- should be a directory listing (or index.html, if one exists) of the directory named sandra.