Home>Support>Password protected pages display the 404 page

Password protected pages display the 404 page

By Greg Zinn, 10 years ago. Last reply by Greg Zinn, 10 years ago.
Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Here is the site in question, it mostly works fine: http://www.scsrealestateservices.com/

I have a test page here: www.scsrealestateservices.com/custom/input.php (it just displays “12345 hi”, that’s normal)

I have another test page here, but this time the directory is password protected: http://www.scsrealestateservices.com/custom2/input.php

When I use cPanel to make a directory (such as /custom2/) password protected, the page I am trying to visit does not ask for a password. Instead, it displays the website’s 404 page.

URL: http://www.scsrealestateservices.com/custom2/input.php

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 10 years, 30 days ago Magus
    Hi, I Work Here

    Hi Greg

    Please try this.

    Create a file on your website. Call it onerror.html. It can have just in it.
    In WordPress’s .htaccess file, add this to the top of the file:

    ErrorDocument 401 /path/to/onerror.html

    See if that makes any difference. If it doesn’t, add another line with 403 instead of 401.

    This is a known issue when using password protected directories on linux servers

    Let us know how you get on

    Magus

  2. 10 years, 29 days ago Greg Zinn

    Thank you! The issue is resolved after I created onerror.html and added this line to the top of the htaccess file:

    ErrorDocument 401 /onerror.html

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More