title: How can I store my Rewrite Rules in a database?
body: <p>Im developing a new site, and I'd like to store my rewrite rules in a database, instead of right in the .htaccess files.</p>
  
  <p>I have another site that uses Opensef (<a href="http://sourceforge.net/projects/opensef/" rel="nofollow noreferrer">http://sourceforge.net/projects/opensef/</a>) with a Joomla! installation that is doing this, but im not even 100% how it works underneath the hood.</p>
  
  <p>How can I store these rules in a database, query for them on request and rediret to the clean URL if found? Is there a better way to do this instead of loading up a .htaccess file (there may be 1000's of entries)?</p>
  
  <p>Thank you,</p>