I am attempting to make it rewrite any path that consists of a filename with no extension within x quantity of folders (such as this zefur.internet/dira/dirb/pagename). That part works fine, but I'm not going it to rewrite once the first folder's title is comparable to the following:

  • forum
  • admin
  • archive
  • sphider
  • labs
  • zim/m (that one is really a folder in the folder)

Here's my code:

RewriteCond %{HTTP_HOST} ^zefur.net$
RewriteCond %{REQUEST_URI} !^((forum|admin|archive|sphider|labs|zim/m)(/.*)?)$ [NC]
RewriteRule ^(([A-Za-z0-9\-_\+%]+?)(/[A-Za-z0-9\-_\+%]+?)*?)/?$ http://zefur.net/index.php?p=$1 [L]

However when Time passes to http://zefur.net/forum/ it rewrites to http://zefur.net/index.php?p=forum/