I currently redirect all non-file, non-directory HTTP requests to the front controller of my MVC framework with this bit of mod-rewrite:
<IfModule mod_rewrite.c>
RewriteEngine on
# if there's only one URL bit, load it as a file
# this is for things like login.php, contact.php etc.
RewriteRule ^([^/]+)/$ $1.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# route all remaining URL's to the front controller
RewriteRule .* index.php [L]
</IfModule>
However, I need to add a trailing slash to my URLs. Since the typical way to add a trailing slash is to use a 301 redirect to the URI with the slash concatenated, it conflicts with my redirect to the front controller (you can only redirect once)...
Any ideas on how I can add the slash before it is redirected, so that the URI carries forward to the front controller with the trailing slash in tact? Not having the trailing slash is screwing with my breadcrumb class further down the code road...