[wp-hackers] How do I remove rewrite rules?

Abdussamad Abdurrazzaq abdussamad at abdussamad.com
Sat Oct 13 05:33:25 UTC 2012

You'll need to plug into an action called  "generate_rewrite_rules". The 
call back function will take one argument $wp_rewrite which is the 
rewrite object. $wp_rewrite->rules will allow you to get/set the current 

On 10/12/2012 09:01 PM, Tom Barrett wrote:
> Specifically, I would like to remove attachment rewrite rules and replace
> them with a leading slug (e.g. /media/).
> My Google-fu has abandoned me - all I can find is related to flushing and
> apache rewrite. I want to delete the rule.
> My main reason for this is slug collisions with media items. Especially
> that they take precedence over pages.

More information about the wp-hackers mailing list