Skip to content

Commit 14ec142

Browse files
authored
Merge pull request #9 from justcoded/develop
Deny access for non-secure dev files
2 parents 46ee667 + 7d4f9a7 commit 14ec142

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

.htaccess.example

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,18 @@ AddType image/x-icon .ico
3333
</IfModule>
3434

3535
#Security
36-
<IfModule mod_rewrite.c>
37-
Options All -Indexes
38-
<Files .htaccess>
39-
order allow,deny
40-
allow from all
41-
</Files>
42-
<files wp-config.php>
43-
order allow,deny
44-
deny from all
45-
</files>
46-
</IfModule>
36+
Options All -Indexes
37+
<FilesMatch "^(readme.*|license.*|composer.*|wp-config.php|README.*)$">
38+
order allow,deny
39+
deny from all
40+
</FilesMatch>
4741

4842
# BEGIN WordPress
4943
<IfModule mod_rewrite.c>
5044
RewriteEngine On
5145
RewriteBase /
5246

47+
RewriteRule ^vendor(/|$) - [F]
5348
RewriteRule ^(^\.|\/\.) /index.php [QSA,L]
5449

5550
RewriteRule ^index\.php$ - [L]

0 commit comments

Comments
 (0)