mod rewrite: ignoring calls to specific directories

"Murilo Pinto" <xaraya-Mm/[email protected]> Sat, 13 Mar 2004 14:43:22 -0300
Newsgroups gmane.comp.cms.xaraya.curiosa
Organization Xaraya News Server
Message-ID <[email protected]>
After that paper on ALT, I just can't skip this ng :-)

Here's the deal: I set up some rewrites in a server, and they all work fine.
The system I'm setting up is PN based, and even the multisites are all OK.

But I need the rules to ignore calls for some directories using the former,
static HTML, system.

So, the root files and some subdirs are still HTML, and any call to them
must be ignored.
PN multisites needs these rules:

RewriteRule ^(siteA|siteB|siteC)$ /$1/ [L,R]
RewriteRule ^(siteA|siteB|siteC)(/?)(.*)$ /PNSYSDIR/$3 [L,NC]

The root HTMLs are handled corretly, too. The issue is with the other
subdirs (non-PN). The structure is like this:
/index.html
/subdir1
/subdir2
...
/pnsysdir

I thought of this one before both the two rules above, but it didn't work.
RewriteCond   %{REQUEST_URI}  !^subdir(.*)/.*$

The HTML directories are actually numbered as 01, 02, 03.....

Do you understand? The URLs should work as:
/index.html -> old home
....
/subdir1 -> old htmls
/subdir2 -> "
...
/siteA -> PN multisite A
...

And only the second case isn't OK.

Thanks in advance,
Murilo