• Resolved magicalwonders

    (@magicalwonders)


    Hi Folks,

    I have a fresh install of WordPress version 3.2.1 and I’m trying to increase security by password protecting the wp-admin folder. Unfortunatley when browsing to the folder I get a “page not found” error
    https://www.seohertfordshire.biz/wp-admin/

    From what I’ve managed to find out, it appears to have something to do with the .htaccess file. My attempts to edit the file are so far unsuccessful.

    WordPress is installed in the root directory (puplic_html) and I have created and uploaded three extra files 401.html 403.html and 404.html in the same folder.

    I have edited the .htaccess in the root folder as follows –

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName seohertfordshire.biz
    
    # BEGIN WordPress
    ErrorDocument 401 /home/seohertf/public_html/401.html
    ErrorDocument 403 /home/seohertf/public_html/403.html
    ErrorDocument 404 /home/seohertf/public_html/404.html
    
    <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

    .htaccess is not my forte, and I’d be really grateful if someone could let me know where I’m going wrong with this.

    Hope someone can advise.

    Myles

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

    (@magicalwonders)

    Now resolved by removing the error document handling from the WordPress block and including “ErrorDocument 401 default” above the block. (Without the quotes)

Viewing 1 replies (of 1 total)
  • The topic ‘htaccess Protected Directory, and 404 Error’ is closed to new replies.