-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.htaccess
More file actions
58 lines (48 loc) · 1.26 KB
/
.htaccess
File metadata and controls
58 lines (48 loc) · 1.26 KB
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
57
58
DirectoryIndex index.html index.php
Options +FollowSymlinks
# Force HTTPS (uncomment if you want to redirect to https)
#RewriteEngine On
#RewriteCond %{HTTPS} off
#RewriteCond %{HTTP:X-Forwarded-Proto} =http
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# 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
# redirect 404 errors to 404-page
ErrorDocument 404 /404
# limit types of files to be uploaded
<Files ^(*.jpeg|*.jpg|*.png|*.gif|*.pdf)>
order deny,allow
deny from all
</Files>
<Files wp-config.php>
order allow,deny
deny from all
</Files>
<Files .env>
order allow,deny
deny from all
</Files>
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Block the include-only files
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp/wp-admin/includes/ - [F,L]
RewriteRule !^wp/wp-includes/ - [S=3]
RewriteRule ^wp/wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp/wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp/wp-includes/theme-compat/ - [F,L]
</IfModule>
Options All -Indexes
# todo: add stuff for CORS to make API work over different domains