Allow Single URL Through .htaccess Password Protection
20 November 2013 at 18:21
Author: css-tricks Language: United States License: Freeware Size: 0 KB Downloads: 20 times
This code is useful for multi environment setups (staging, production,
etc.) it allows you to keep your htaccess files in sync while
maintaining an htpasswd on your development environment or anything but
the live environment.
#allows a single uri through the .htaccess password protection
SetEnvIf Request_URI /testing_uri$ test_uri
#allows everything if its on a certain host
SetEnvIf HOST ^testing.yoursite.com testing_url
SetEnvIf HOST ^yoursite.com live_url
AuthName Restricted Area
Deny from all
Allow from env=test_uri
Allow from env=testing_url
Allow from env=live_url
A portal that has dedication and concentration in the development of computer programming and more
resource for help people such as open project, jobs, question & answer, additional tools, and many more.
Collection of various kinds of code programming language from desktop to web programming.