-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
29 lines (26 loc) · 898 Bytes
/
.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
# Block the include-only files.
RewriteEngine On
RewriteBase /
RewriteRule ^wp/wp-admin/includes/ - [F,L]
RewriteRule \.env - [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]
# Disable fetching plugin versions through readme.(txt|html)
RewriteRule ^(.*)readme\.txt$ index.php? [L,R=301,NC]
RewriteRule ^(.*)readme\.html$ index.php? [L,R=301,NC]
# Serve WP from subdirectory
RewriteCond %{REQUEST_URI} !^/wp/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ wp/$1
RewriteRule ^/?$ wp/index.php [L]
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^wp/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . wp/index.php [L]
# END WordPress