[wp-hackers] Help with wp_rewrite?

Derek Hogue derek at amphibian.info
Sat Dec 1 01:21:03 GMT 2007

Hey all,

I know this seems to be a common thread, but reading through old posts  
here and scouring the codex and forums is not bringing me to a solution.

It's pretty simple - I'm looking for a way to add a simple Rewrite tot  
he WP Rewrite rules..  Following the codex example, and other  
examples, this seems like it should work:

function gigpress_feed_rewrite($wp_rewrite) {
     $feedrules = array('^shows.xml$' => 'wp-content/plugins/gigpress/ 
     $wp_rewrite->rules = $feedrules + $wp_rewrite->rules;

add_filter('generate_rewrite_rules', 'gigpress_feed_rewrite');

But no go - I just get redirected back to my index.

f I manually add this to my .htaccess file, above WP's conditions:

RewriteRule ^shows.xml$ wp-content/plugins/gigpress/feed.php [L]

It works like a champ.  And I am indeed updating my permalinks on my  
options page.

Any ideas as to what I'm missing here?  Any help would be greatly  
appreciated - thanks.


More information about the wp-hackers mailing list