Re: mod rewrite: ignoring calls to specific directories

[email protected] (mikespub) Tue, 16 Mar 2004 16:23:01 GMT
Newsgroups gmane.comp.cms.xaraya.curiosa
Organization not much
Message-ID <[email protected]>
In article <c2vhlt$68i$1-111RdWWlOxkOkXtL6OYfHgC/[email protected]>, "Murilo Pinto" <[email protected]> wrote:
>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
>

For anyone else reading this thread in 50 years, the best references for
mod_rewrite issues are :

- http://httpd.apache.org/docs-2.0/misc/rewriteguide.html
- http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html

Just in case :-)

Mike.