{SPAM 59%} Re: [wp-hackers] rewrite_rules filter

Ryan Boren ryan at boren.nu
Thu Jul 1 04:41:24 UTC 2004


On Thu, 2004-07-01 at 00:32 -0400, Owen Winkler wrote:
> > Code to do this could be stolen from another GPL project, such as
> > Gallery.  It uses #BEGIN and #END tags to mark its additions to
> > htaccess.  It's not hard code to write, just painfully dull to do for
> > the gazillionith time.  Might as well steal.
> > 
> > Any takers, or do I have to do it?
> 
> Is the return value an array or a \n separated string?

Look in options-permalink.php.  $rewrite is an array of match, query
pairs.  A foreach loops over these pairs and constructs $rules.  $rules
is the actual RewriteRules, separated by newlines.  $rules can be dumped
to htaccess between #BEGIN, #END tags.

Ryan





More information about the hackers mailing list