Currently the nginx rules for the theme directory includes a similar to the following, can we please remove it, as it breaks access to URLs that shouldn’t have a trailing slash, such as https://wordpress.org/themes/sitemap.xml
There should already be a handler in the PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. https://www.php.net/manual/en/preface.php. environment to add the trailing slash if it’s missing.
location /themes/ {
# Add a trailing slash to all themes
rewrite ^/themes/([^/]+)$ /themes/$1/ permanent;
}
This is being tracked as #5022-meta.