Password Protection Script 2 Insert this code in the 'HEAD' tags of the HTML of the web page. Step 2: Go on the Review tab and click on the Protect Sheet or Protect Workbook. Based on the crypto-js library, StatiCrypt uses AES-256 to encrypt your string with your passphrase in your browser (client side).. Download your encrypted string in a HTML page with a password prompt you can upload anywhere (see example).. Login to your WordPress website dashboard. When the user enters the given password it needs to redirect automatically to another page that is protected by that password. Thanks for this great code. The .htpasswd file can contain multiple usernames and passwords. You can create a staging and development page with the website design live on your website without page visitors seeing the page under construction. If you need to secure multiple pages and want access on one page to Thanks for contributing an answer to Stack Overflow! Set a passphrase. @alexnathanson - With regard to redirect vs return, either could work and using return would obviously simplify the code as you then don't need the redirect and current_url methods. And how can I configure .htaccess to not be browsable? I have the same problem Keshav Gyawali is having. Users don't need to re-enter password when accessing your private content until its cookies expire. I share my Notion account with my girlfriend - she started using Notion first with *my* university email because her sixth form email wasn't eligible for personal pro free, and she set up my own individual workspace after, but we share ONE password. It has no relation to CMS backend and Nicepage editor. // If user has access then simply return so original page can render. Top Items to Include on a Gym or Fitness Website, SEO Best Practices: Always Serve Quality Content, 3 Scheduling Apps that Make Your Life Easier. @Baljeet21 - To logout you would need to delete the session variable. Click the blue Publish to save your changes. Example: https://webpage.com/protected-page.php -> When entering the password ->https://webpage.com:80/protected-page.php. To password protect a page: Click Pages on the left side of the Editor. Never add private or sensitive information about you or your clients to password protected pages. The user will only need, # to input the password once. Clone with Git or checkout with SVN using the repositorys web address. If you want to add password-protection to your own Cloudflare Pages site, just head to the repo and follow the instructions there. I need to protect one file and one folder in my php based script. Protect Post Content and Avoid Page Refresh using AJAX upon Password Submit, HTML text box and button that redirects user to a page of same name not working when