I'm using mod_rewrite to redirect like so:
RewriteRule (work)/?$ $1.php [L]
This sends any URL ending in /work
or /work/
to work.php
The problem is, when a trailing slash is included, it treats it as a directory, and not the file that it really is. This, of course, breaks all of my relative paths in the file.
I don't mind having a slash in the URL, but is there any way to use Apache to ignore the trailing slash, and treat the URL as a file, just as it would without the slash?