A web-based text editor comes to mind.
How?
[edit] You might be talking about a kind of site administration thing, but in that case the .htaccess is just a normal file you'd want to edit as your site evolves. We're talking about something that needs the .htaccess to change dynamically and (I assume) automatically for whatever reason.
Yes, this is for administration for a CMS that's uber-user-friendly. So yea. You'd have a set of settings for your website that would dynamically change htaccess files based on decision. So you don't really need a developer to set things up.
That being the case you would likely use the RewriteMap directive (http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritemap) instead to retrieve data directly from your database rather than using php to rewrite your .htaccess file.