• Hi.
    I have wordpress, with permlinks, and I’ve got a .htaccess file in the root.
    But I have a secured directory outside of wordpress which displays stats.
    /stats/
    how can I exclude this from the .htaccess file?
    I’ve searched and tried lots of things, but I either get it so that nothing works, or that I can’t get the stats page.
    I’ve tried.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    # stuff to let through (ignore)
    RewriteCond %{REQUEST_URI} ^/stats/(.*)$
    RewriteRule ^.*$ – [L]#
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    and
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    # stuff to let through (ignore)
    RewriteCond %{REQUEST_URI} !^/(stats|stats/.*)$
    RewriteRule (.*) $1 [L]
    #
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    neither works.

    Any Ideas?

    Leona.

Viewing 1 replies (of 1 total)
  • Thread Starter Leona

    (@wp-leona)

    Ok seems the problem is with protected directories.

    This is the correct file.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} !^/(stats|stats/.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    Which worked fine until I used apache protected dir.
    Then I got a 404 instead of a password dailog.

    Any ideas.

    Leona.

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