From 3f1b4a0d795ecc63e671ac0acd86a3962bd4137d Mon Sep 17 00:00:00 2001 From: Kaspars Dambis Date: Thu, 9 Jul 2020 18:48:28 +0300 Subject: [PATCH] Sync the config file --- docker-compose.yml | 1 + local/config/.htaccess | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 local/config/.htaccess diff --git a/docker-compose.yml b/docker-compose.yml index 67e8fe40c..db46074e1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -27,6 +27,7 @@ services: - .:/var/www/html/wp-content/plugins/stream-src # Working directory. - ./build:/var/www/html/wp-content/plugins/stream # Built version for testing. - ./local/public:/var/www/html # WP core files. + - ./local/config/.htaccess:/var/www/html/.htaccess - ./local/config/wp-cli.yml:/var/www/html/wp-cli.yml - ./local/config/wp-config.php:/var/www/html/wp-config.php - ./local/config/wp-tests-config.php:/var/www/html/wp-tests-config.php diff --git a/local/config/.htaccess b/local/config/.htaccess new file mode 100644 index 000000000..c3a1a7e51 --- /dev/null +++ b/local/config/.htaccess @@ -0,0 +1,16 @@ +# For a subdirectory multisite +# BEGIN WordPress +RewriteEngine On +RewriteBase / +RewriteRule ^index.php$ - [L] + +# add a trailing slash to /wp-admin +RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] + +RewriteCond %{REQUEST_FILENAME} -f [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^ - [L] +RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] +RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] +RewriteRule . index.php [L] +# END WordPress