Skip to content

Instantly share code, notes, and snippets.

@digital-thinking
Created October 2, 2015 08:26
Show Gist options
  • Save digital-thinking/46bad4d8940b49f50266 to your computer and use it in GitHub Desktop.
Save digital-thinking/46bad4d8940b49f50266 to your computer and use it in GitHub Desktop.
Wordpress/Apache restrict access to subfolders (disable directory browser)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Options -Indexes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment