Password Protecting Your Pages with htaccess

Simple steps to password protect your pages with htaccess

Step-1: Make sure that “mod_rewrite”  extension of apache is enabled. If it’s already enabled, skip this step.

Step-2: Create a “.htaccess” file in the web root  folder. If “.htaccess” file is already exists, skip this step also.

Step-3: Add following code to the “.htaccess” file.