• How i’m having a problem, I have a subfolder, let’s call it
    sub1 , it has a .htaccess file in it to secure it.

    [ Moderator note: Code fixed, please wrap code in backticks or use the code button. ]

    <Files ~ "^\.(htaccess|htpasswd)$">
    deny from all
    </Files>
    Options Indexes
    AuthUserFile /home/site/access/.htpasswd
    AuthGroupFile /dev/null
    AuthName "Please enter your ID and password"
    AuthType Basic
    require valid-user
    order deny,allow

    it work fine on it’s own, only if i removed the .htaccess in the root directory, which is where wp site is in. my question is how to make the sub-folder be accessible without the rewrite rules of wp to simply forward it back to the root index

    here my .htaccess in the root:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

  • The topic ‘.htaccess rewrite rules’ is closed to new replies.