[wp-hackers] Redundant rewrite rules help

Josh Pollock jpollock412 at gmail.com
Thu Mar 20 21:37:00 UTC 2014


Check out the attached PDF in this article:
http://hardcorewp.com/2014/hardcore-url-routing-for-wordpress/ Everything
you ever needed to know about rewrites.


On Thu, Mar 20, 2014 at 5:13 PM, BenderisGreat <greglancaster71 at gmail.com>wrote:

> I have a number of rewrite rules, and they all are prefaces with the same
> initial rule;
>
>     add_rewrite_rule('member/([^/]+)$', 'index.php?member=$matches[1]',
> 'top');
>
> If I have another page after member, it would look like this;
>
>
>     add_rewrite_rule('member/([^/]+)/second_var/?$',
> 'index.php?member=$matches[1]&second_var=second_var', 'bottom');
>
>
> Is there a way to automatically include the top level rewrite rule on all
> the rest?  I am trying to make this more dynamic, and this makes it
> difficult.
>
>
>
>
>
> --
> View this message in context:
> http://wordpress-hackers.1065353.n5.nabble.com/Redundant-rewrite-rules-help-tp43747.html
> Sent from the Wordpress Hackers mailing list archive at Nabble.com.
> _______________________________________________
> 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