• I am using wordpress 1.5, and .htaccess for rewrite rules.
    My problem is that my webhost already has a rewrite rule for /stats on my server, but wordpress is overriding that preset. So my question is, using wordpress rewrite rules, what should I put in my .htaccess file to ignore /stats on my website (e.g. domain.com/stats).

    Thanks

Viewing 1 replies (of 1 total)
  • Do you already have a stats directory? If you do, I’m guessing you could just put a .htaccess file in that directory and have it have the one line

    RewriteEngine off

    which would disable use of the rewriting once Apache had read the .htaccess file. The thing is, if you don’t actually have the stats directory itself, then that won’t work. One thing you could do is to create a stats directory, and in there put a .htaccess file that had the above one line, and then have an index.php in that stats directory that did a redirect to whatever it is that your host is rewriting the /stats to. This would be a problem only if you didn’t know what your host was rewriting it to, or if it was rewriting it to something that you couldn’t redirect to – that is, something that was outside of the document root.

    Apache looks through the directory structure first and then looks at the .htaccess files, so a directory that has a .htaccess file in it that disables rewriting will not have any rewrite problems with that directory or any sub-paths of them.

Viewing 1 replies (of 1 total)
  • The topic ‘mod_rewrite ignore directory’ is closed to new replies.