-
Notifications
You must be signed in to change notification settings - Fork 4
/
.htaccess
28 lines (23 loc) · 973 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
# Serve the assets folder normally, and stop processing before the other rules.
RewriteEngine on
RewriteRule assets/.* - [L]
# Allow serving from vendor-prefixed too
RewriteEngine on
RewriteRule vendor-prefixed/.* - [L]
# Serve the contents of /wordpress/ from the root URL for the project.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.*bh-wp-autologin-urls$ [NC,OR]
RewriteCond %{REQUEST_URI} !wordpress/
RewriteRule (.*) wordpress/$1 [L]
# Remove /wordpress from any querystring, i.e. it was being added to login redirect.
RewriteEngine on
RewriteCond %{QUERY_STRING} ^(.*)%2Fwordpress(.*)$ [NC]
RewriteRule (.*) %{REQUEST_URI}?%1%2 [R=301,L,NE]
# Enable WP_DEBUG.
php_flag log_errors On
php_value error_log "wp-content/php_errors.log"
# Trick WordPress into thinking we're serving REST API over HTTPS.
SetEnvIf Request_URI api HTTPS=on
SetEnvIfExpr "%{QUERY_STRING} =~ /api/" HTTPS=on
# Set return type for wp_get_environment_type()
SetEnv WP_ENVIRONMENT_TYPE local