Skip to content

Instantly share code, notes, and snippets.

@ngstigator
Created June 4, 2018 21:40
Show Gist options
  • Save ngstigator/90698b87f0510d6b30bcfc832c856283 to your computer and use it in GitHub Desktop.
Save ngstigator/90698b87f0510d6b30bcfc832c856283 to your computer and use it in GitHub Desktop.
Drupal 7 .htaccess password protect custom directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
# CUSTOM - make node export download directory password protectable
RewriteCond %{THE_REQUEST} !/sites/default/files/CUSTOM/.*
RewriteRule ^ index.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment