WordPress.org

Ready to get started?Download WordPress

Forums

password protected site (4 posts)

  1. kabir001
    Member
    Posted 1 year ago #

    Hi, i am new to wordpress. i am currently using WordPress multisite and wanted to have all my sites password protected. So, i added .htaccess to root forlder on '/wordpress' and my main site prompts for password nicely, but all sub-sites are returning with 404 error. Can any one help me out please. these are the following line i have for .htaccess file ....

    AuthName "Please Log-in"
    AuthType Basic
    AuthUserFile /dev/www/.htpasswd

    require user guest1

  2. kabir001
    Member
    Posted 1 year ago #

    Ok, i added the following lines into .htaccess file>>>

    DirectoryIndex index.html index.php
    
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php?sef_rewrite=1 [L,QSA]
    
    </IfModule>
  3. kabir001
    Member
    Posted 1 year ago #

    after adding those above lines into .htaccess, everything works accept my images and logo all are broken. any idea?

  4. You don't seem to have a clear understanding of what you're doing with .htaccess, and you're talking about two separate things.

    1) Password Protecting WP (doesn't work well with Multisite, due to the nature of how the virtual sites are created - not something we advocate)

    2) Hotlink protection. Read this: http://perishablepress.com/creating-the-ultimate-htaccess-anti-hotlinking-strategy/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.