Encrypting A Web Page

109 views Asked by At

I am trying to create a web page that a password needs to be entered to access the content on the page, and I want to make sure that the password can not easily be found in view source or in any other files referenced in the file.

I have found a few things online, but I can not figure out how to use a password that can not be easily viewed. I am hosting the website myself, so I have access to whatever I need to do.

Hopefully someone can give me an idea, Thanks.

1

There are 1 answers

1
WayneB On

What OS is the web server running? If it is Apache then you can easily do this using a .htaccess file with something like:

AuthType Basic
AuthUserFile /path/to/password/file
AuthName "Please Enter Password"
Require valid-user

If you are on an IIS server then you will need to go something like:

https://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig