It has nothing to do with mod_rewrite being on or off. It’s the rewrite rule that is wrong. It should be switched around and have a regex for the last parameter in the first segment. I am not a regex expert so don’t quote me on this, but it should look similar to something like
Adding onto this. The rewrite condition is also incorrect. IIRC, rewrite conditions are only used to check if the requested URI is a file, directory, or symbolic link. If it’s one of those 3, then don’t overwrite the URI with the request, but instead, use the actual file.
The leading / usually tells Apache to use the root of the directory I believe. I remembered messing around with it once. I had the .htaccess in a subdirectory and tried to get the current directory it was in, but couldn’t get it because I kept using the leading slash. I don’t recall if using rewrite base worked, but I remember something got it to work. Maybe I removed the leading slash too.
You DO remember correctly: The handling of the leading slash (required by Apache 1.x) was originally ignored (treated as an error) by Apache 2.x. I’ve been informed that Apache 2.x no longer makes that differentiation but have yet to (bother to) confirm.
RewriteBase, IMHO, is too confusing to bother with because it substitutes a relative link into the target. The best write-up I’ve found on this is from StackOverflow:
RewriteBase is only applied to the target of a relative rewrite rule.
Using RewriteBase like this…
RewriteBase /folder/
RewriteRule a.html b.html
is essentially the same as…
RewriteRule a.html /folder/b.html
But when the .htaccess file is inside /folder/ then this this also points to the same target:
RewriteRule a.html b.html
Although the docs imply always using a RewriteBase, Apache usually detects it correctly for paths under the DocumentRoot unless:
You are using Alias directives
You are using .htaccess rewrite rules to perform HTTP redirects (rather than just silent rewriting) to relative URLs
In these cases, you may find that you need to specify the RewriteBase.
However, since it’s a confusing directive, it’s generally better to simply specify absolute (aka ‘root relative’) URIs in your rewrite targets. Other developers reading your rules will grasp these more easily.