Support » Networking WordPress » password protected site

  • 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

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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]

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

    Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    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:

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘password protected site’ is closed to new replies.