WordPress.org

Forums

.htaccess error (6 posts)

  1. shounakgupte
    Member
    Posted 5 years ago #

    Hi. I installed by blog on my site a few months back and now i am trying to password protect some of my other directories of the site with .htaccess. During installation, wordpress wrote the following lines in my .htaccess file

    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]

    The password protect doesnt work if these lines are there in the file. If I remove these files, the password protect does work but none of my pages on the blog open.

    Does anyone have a workaround this problem? Any help is highly appritiated!!

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    There shouldn't be any clash here. If you want to password protect directory foo, you need to place a new .htaccess file in the foo directory. You don't change the WP or root .htaccess file.

  3. shounakgupte
    Member
    Posted 5 years ago #

    i am doing the password protection through my hosting company using cpanel. not sure where it places the new file.

    can i check it using ftp?

  4. shounakgupte
    Member
    Posted 5 years ago #

    hi esmi. the new .htaccess files are under the respective directories.

  5. shounakgupte
    Member
    Posted 5 years ago #

    any help?

  6. shounakgupte
    Member
    Posted 5 years ago #

    any solutions?

Topic Closed

This topic has been closed to new replies.

About this Topic