WordPress.org

Ready to get started?Download WordPress

Forums

Issue with mod_rewrite on WP install (2 posts)

  1. cewyattjr
    Member
    Posted 4 years ago #

    Not quite a WP problem, but maybe others have come across this:

    I have a WordPress installation using this mod_rewrite scheme for .htaccess:

    Options -Indexes

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Problem is that I want to have an admin sub directory with its own .htaccess file that has a simple authentication requirement, and it simply won't work. I get a 404 response if I attempt to request the URI for that directory if I activate .htaccess, here is the entire contents:

    AuthName "My Secret Folder"
    AuthUserFile /home/public_html/admin/phpmyadmin/htpass
    Require valid-user

    Of course the subdirectory .htaccess works great if I eliminate the mod_write on the parent directory.

    The parent .htaccess file is standard for WordPress and haven't had this issue before, so I'm assuming it has something to do with httpd.conf (AllowOveride) ?

    thanks,

    Chuck

  2. gilzow
    Member
    Posted 3 years ago #

    Just recreated what you described and was able to access a subdirectory. Essentially, what the wp .htaccess file says is:

    if the requested resource isnt a file physically in this space, AND the requested resource isnt a directory physically in this space, redirect the request to index.php

    So wp's .htaccess file shouldnt be interfering with a request for a subdirectory if the subdirectory really exists.

    Do you have access to your http.conf?

Topic Closed

This topic has been closed to new replies.

About this Topic