I've been looking into standardizing all of my sites URLs before I launch (For obvious reasons), and have been doing a lot of research on the subject. I've come to the following conclusions:
It does not matter if you use a forced trailing slash or forced no trailing slash, as long as you don't have multiple URLs for the same page.
It looks better, and makes more sense for a lot of people if directories/collections (I.e. posts/ or articles/) have a trailing slash, while "files" or specific items (An article or blog post for instance) don't (I.e. posts/2012-02-05-Stackoverflow-rules or articles/12-Proper-URLs).
Now I'm obviously open to debate / other opinions on this subject, but right now I'm leaning towards this method of URL... With that said, what would be the best way to force this standard? My system is based on modules, I have no idea how many modules I will have and I would really rather not edit the .htaccess file with a new mod_rewrite rule for every new module I (Or someone else) adds - that just gets messy.
Is there some easy, sure-fire way to do this without htaccess, in PHP? Do I even need to? All of the URLs are going to be generated by a single class which will reinforce those standards, and this is a proper MVC framework - so adding some code for pages that don't match the standards above wouldn't be all that difficult - but I'm just not sure what the best way to do it would be.
Clarification
Edit To clarify, I'm trying to figure out how to make some links have trailing slashes, and some links not have trailing slashes*, and if someone links to the wrong URL (No trailing slash on a URL that needs to have one, or vice versa) it will redirect the user to the proper url.
*An example would be
- www.example.com/articles/
- www.example.com/blog/
- www.example.com/forums/
For pages that need a trailing slash, and
- www.example.com/articles/21-Article-Name
- www.example.com/blog/2012/02/06/Blog-Post
- www.example.com/forums/post/29531/Post-Title
For pages that shouldn't have a trailing slash. Basically "directories" have slashes and "files" don't.emphasized text
So basically, what would be the best way to accomplish this? Obviously all internal links will meet this standard, but I am unable to control other sites - and them linking with or without a trailing slash may hurt my SEO. And on a related note, what is your opinion on this style of URL?