The MU forums have moved to WordPress.org

Think found bug in .htaccess when used with Apache 1.3 (1 post)

  1. Levander
    Inactive
    Posted 18 years ago #

    Running the wpmu-2005-3-15 snapshot that I think is currently the most popular for people not developing wpmu.

    I think this only affects people who have installed wpmu in their apache DocumentRoot (not in a subdirectory of DocumentRoot like /blogs) and are running Apache 1.3 (not Apache 2.0).

    To test if your install is affected by this, open in FF http://example.com/favicon.ico - replacing your host name for example.com of course. I don't know what happens in IE, I fixed it before I tested it in there. If FF gives you an error opening this URL saying something like "redirect limit exceeded", then maybe your hit by this bug.

    Basically, in the wpmu/.htaccess there are two RewriteCond directives at the bottom of the file. The have the string "%{1}" in them. Think both of those occurrences of that string should be changed to "$1" instead.

    I'm learning mod_rewrite to run wpmu, but my understanding is that those two RewriteCond test for the existence of a directory in the blogs directory. And, the %{1} string is supposed to be a "reference back to the last RewriteRule directive". However, in the apache mod_rewrite documents, in both versions 1.3 and 2.0:

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

    The %{ VARIABLE_NAME } syntax is supposed to be to reference server variables, not fields matched from the last RewriteRule directive.

    On my development machine, running Ubuntu Hoary and Apache 2.0, this distributed .htaccess works fine. However, on my hosting account I'm using as a production machine running RHEL Advanced Server v. 3 and Apache 1.3, that .htaccess didn't work and had to be modified. I'm guessing the discrepancy is in the Apache version.

    No idea why it works in Apache 2.0, it's not documented that it's supposed to work. Although, this discrepancy may not be due to the Apache version, but the regex library installed on the machine. The Apache documents said something about referring to "man 3 regex" to learn more about regular expressions. So, maybe Apache is just configured to run with various regular expression libraries on various machines.

    In any event, if my understanding of the wpmu .htaccess file is correct, the syntax of the .htaccess file distributed with 2005-3-15 is not documented to work correctly.

    Should be pretty easy to fix. Am really excited about getting my site up and running with wpmu.

About this Topic

  • Started 2025 years ago by Levander