mod_rewrite append slash at the end, except if there was a question mark
I like to enforce an ending slash at the end of my URLs, which I do with the following in my .htaccess file:
regex doesn’t clear non-valid characters from capture group in htaccess mod_rewrite
I have a mod_rewrite that is meant to check a date value and redirect as appropriate.