-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
56 lines (49 loc) · 1.53 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# BEGIN SecuPress readme_discloses
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule (/|^)(readme|changelog)\.(txt|md|html)$ - [R=404,L,NC]
</IfModule>
# END SecuPress
# BEGIN SecuPress directory_index
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.htm index.cgi index.pl index.xhtml
</IfModule>
# END SecuPress
# BEGIN SecuPress bad_url_access
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !wp-includes/js/tinymce/wp-tinymce\.php$
RewriteRule ^(php\.ini|wp-config\.php|wp-includes/.+\.php|wp-admin/(admin-functions|install|menu-header|setup-config|([^/]+/)?menu|upgrade-functions|includes/.+)\.php)$ [R=404,L,NC]
</IfModule>
# END SecuPress
# BEGIN SecuPress directory_listing
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
# END SecuPress
RewriteEngine On
RewriteRule ^.*\.git.* - [R=404]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# Block the include-only files.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>
# 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