URLs with a trailing slash are not redirecting to the non-slashed version. I see the .htaccess rule managing this:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\/(\?.*)?$ $1$2 [R=301,L]

But it doesn't seem to be taking effect. For example if I visit http://gravitydept.com/work/ then it redirects to a 404:

http://gravitydept.com/home/xxxxxxx/domains/gravitydept.com/html/work

The same thing happens locally in MAMP:

http://gravitydept.dev/Users/brendan/work/projects/gravity-department/gravitydept.com/v1/web-root/work

Statamic seems to be appending the server root before the URL when removing the trailing slash, which is causing the problem.

I recently updated to Statamic 1.9.1 and moved from a Media Temple DV to Grid server. Don't think this issue is related to server change because it's happening MAMP too.

Tip: you can find trailing slashes in Sublime Text by enabling regex search:

href="http://gravitydept.com([a-Z0-9/-])+/"`

As quick fix, I've changed all links to internal URLs to not have trailing slashes. It'd be nice if the redirect worked though so other sites linking to slashed-URLs won't be dead. I'm already at my depth in Apache config though.

Answered by Brendan Falkowski! Go to answer.