Mod_rewrite and RewriteCond usage

Greetings! I recently added some mod_rewrite rules that map a good deal of my site to a common PHP script for handling. Alas, this also blocks some of the Dreamhost-mapped links … like /stats/!

So … I’ve written what I believe to be a correct mod_rewrite rule to ensure that accesses to the DreamHost /stats/ path (for Analog reports) can continue:

RewriteCond %{REQUEST_URI} !^

Yet it keeps going to the handler anyway.

I also tried without the scheme/domain, without the scheme, without the regexp nomenclature, and so on. I suppose I’ve made some degree of pilot error, but haven’t quite found it (yet). :slight_smile:

Anyone have thoughts on how to navigate this one? Please advise - thanks!

  • Joe

According to the DreamHost Wiki

It should be something like:

RewriteCond %{REQUEST_URI} ^/stats/(.*)$ RewriteRule ^.*$ - [L]And those two lines should go before any of the rules related to the PHP script.

:cool: [color=#6600CC]Atropos[/color] |

Auugh! I checked the Wiki too. Apparently not thoroughly enough.

Thank you for catching that. I’ll give it a shot.

  • Joe