Static file directories should append trailing slash to URL (BB-2909)

Kevin Burke avatarKevin Burke created an issue

On my static site server, and

go to two separate places. This violates my expectation (and is hurting my Google search traffic for "markdown css"). I also tried adding a static file called markdowncss that would add a 301 redirect to the directory with the trailing slash, but it looks like you can't have a file and a directory with the same name together (at least easily).

In nginx, it looks like you have to add this setting:

    rewrite ^(.*[^/])$ $1/ permanent;

to append the trailing slash to URL's that don't already have it. For more see this Stackoverflow question at

Comments (3)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.