-
Notifications
You must be signed in to change notification settings - Fork 125
Description
URLs with and without trailing slashes are considered to be different. Serving the same content behind a URL with and without a trailing slash may be considered duplicate content by search engines.
There should be a way to redirect all URLs (via 301 Moved Permanently) to their canonical equivalent. That includes removing empty segments as well as redirecting to the variant with or without trailing slash (that should be selectable – I prefer trailing slashes, because I can then easily add subpages later).
EDIT: Trailing slashes should not be added if a file is accessed, so this seems to be more complicated after all. One can also consider interpreting .
and ..
, this might even be necessary if HTML pages use relative URLs (like <img src="../images/1.jpg">
), but I don’t know to what extent browsers are already required to resolve this before sending the request.