password

Protect website with password

You may want to restrict the development site from search engine or from direct access. One of the popular way of doing so is to use Apache2 Basic Authentication. Here we will be discussing on how to password protect your development site using Apache2 Basic Authentication which makes a use of .htaccess & .htpasswd files. Steps: 1. Create & upload .htaccess file to the root of your dev site with the following content: AuthName "Authorisation Required" AuthUserFile "/path/to/.htpasswd" AuthType Basic require valid-user ErrorDocument 401 "Authorisation Required" Notes: If .htaccess file already exists then you can add the above code on the...