Htpasswd protects index.php unwanted

#1

Hey community,

i got a Website structure like this

and im trying to protect the backendfolder with a htacces password.
I generated it using the Manage password protection Method of 000Webhost. I chose the Backend

But now i got the Issue, that my Main Index Page also is protected although it is not located in the Backendfolder.
Means the login Pop up also appears by opening up index.php.

The ht files are located in the backup folde. I did not touch them.

Code looks like this:

/# HTID:9006266: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW
AuthType Basic
AuthName “Restricted Access”
AuthUserFile “/storage/ssd5/181/8983181/public_html/backend/.htpasswd”
Require user chicknwing
/# DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:9006266:

takeoverultimatemastersleague.000webhostapp.com

#2

Have you tried the security tab on the right hand side far-right when logged into the panel 000webhost.com?

#3

Im not quite sure if i get you right. When you log in you geht the tabs and one of it is settings. In Settings you can click on “Security”. Thats the way i did it.

#4

I can load the site by refusing to enter details.

You are getting that error because inside index.php you’ve got

<?php require_once "backend/classes.php"; ?>
#5

You are right, thank you :slight_smile:

1 Like