Add trailing slashes in WordPress Multisite without damaging the admin interface or the JSON API
问题 For a WordPress multisite installation I am having the following part of my .htaccess: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)([^./])$ %{REQUEST_URI}/ [L,R=301,NE] In a single WordPress installation where /wp-admin and /wp-json always follow directly after the domain I can exclude those from the trailing slash rule with this: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/wp-admin