[wp-hackers] How do I remove rewrite rules?
Chris McCoy
chris at lod.com
Sat Oct 13 15:28:14 UTC 2012
Yes we already do this, we want to remove a default rule
-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Abdussamad
Abdurrazzaq
Sent: Saturday, October 13, 2012 1:33 AM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] How do I remove rewrite rules?
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 rules.
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.
>
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list