Enforce trailing slash

I have a site with 200,000+ pages and I am seeing errors whereby links (both internal and external) do not end with a /

…however, most do.

How can I use a Page Rule to ensure that URLs end with a trailing slash?

Probably not the best idea, even if it is possible.

You need to first figure out why some have a trailing slash and why some don’t. This is likely a configuration issue and/or design issue.

Does the server return the same content for /some-path/ and /some-path or does it redirect one to the other?

As a general rule content is served with a trailing slash where it exists within a directory
/some-path/index.html is served as /some-path/ while
/some-path.html is served as /some-path

Consistency in file structure is key here. Second is ensuring all internal links use the same format (with or without trailing slash.) Third is ensuring that paths are rewritten to the preferred (with/without slash) to handle any external links that don’t conform to preference.


What errors specifically?