I am focusing on a brand new project, using Apache's mod_rewrite and PHP to obtain pretty Web addresses.
This is what my Web addresses seem like:
Observe that there is no trailing slash (that's generate an income write it within the
href characteristics of
However, I am also permitting
http://example.tld/foo/bar/1/etc/ (trailing slash).
Is bad practice? I am wondering if it might be easier to only allow one of the ways or maybe I'd better use trailing slashes in most my links, automatically.
Trailing slashes can generate problems when utilizing relative links within the document, because the browser will treat
/etc like a directory.
I'd define one of the ways, and hang up an exterior redirect for that other.
A trailing slash usually signifies a directory, with no trailing slash it signifies personal files.
Permitting both with and without trailing slash may have an adverse impact on your internet search engine ranking, since the same submissions are indexed two times. Stay with one, and perform a 301 redirect if your user demands another.