Password Protecting public_html and Magento issues

basslion

Registered
Jul 8, 2016
3
0
1
Markham
cPanel Access Level
Website Owner
When we password out root public_html directory and then go to our website admin panel which requires login (Magento), the site fails to load css, images and javascript. On the login page if we view source, we see the paths to all the css, images and javascript and if we click these links, we get error 404 not found when in fact the file is there on the ftp.

When we remove password protect, the site functions normally with no issues and all css, images and javascript paths are functional.

I am thinking this is a server related issue. does anyone know what could be causing this?
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
This usually happens when something is wrong with the path to your htpasswd file

Can you ensure the path is correct? Also try adding this to the end of the htaccess rules:

ErrorDocument 403 default

Example:

Code:
AuthType Basic
AuthName "Secure Area"
AuthUserFile "/home/user/.htpasswds/public_html/passwd"
require valid-user
ErrorDocument 403 default