Sunday 16 February 2014

Password Protect the Directory

To password protect the wp-admin page only and to avoid authentication pop-up window on the other website pages
Follow the following steps :
  • First password protect the directory using the "Password Protect Directories" in the cPanel.
  • After that add the following code in the htaccess of the domain.
                    <IfModule mod_rewrite.c>
                     RewriteEngine On
                     RewriteCond %{QUERY_STRING} !=""
                     RewriteCond %{QUERY_STRING} !^p=.*
                     RewriteCond %{QUERY_STRING} !^s=.*
                     RewriteCond %{REQUEST_URI} !^/wp-admin.*
                     RewriteRule ^(.*)$ /$1? [R=301,L]
                    </IfModule>

  • It will show the authnetication request only for the wp-admin page

ERR_CONTENT_DECODING_FAILED

If you are getting the error as ERR_CONTENT_DECODING_FAILED while accessing the domain then add the below extension in php.ini  ++++++++...