Scripting

Query String Auth In Apache

Query-String-Based Apache Authentication

from : http://www.lucidiocy.com/2010/07/query-string-based-apache.html

RewriteEngine on
RewriteCond %{QUERY_STRING} action=secret_admin
RewriteRule ^/app/.*$ - [E=app_auth_required:1]

<directory /root/of/your/app>
      Order deny,allow
      Deny from env=app_auth_required
      AuthType Basic
      AuthName "Login Required"
      AuthUserFile some_htpasswd_file
      require valid_user
      Satisfy any
</directory>