[wp-hackers] some problem with understanding wp_rewrite

Konrad Karpieszuk kkarpieszuk at gmail.com
Thu Oct 13 11:01:28 UTC 2011


hello

I spent all last night reading codex and tutorials but i still don't
understand how to do this.

I run online shop on wordpress and now i want to create affiliate
program. I will tell to affiliate partners that if someone of them
want to publish referral link on their website, then they have to take
any link from my shops' website and add /partner/1234 at the and,
where '1234' is id of partner

OK, but how to manage this in wordpress? How to register this rewrite
rule that 'any webpage which has "/partner/(.*?)" at end should be
redirected to  version without this (or even it can stay) and to
query_vars[] will be added 'partner''?

"Any" means that partner can publish somewhere links like:
example.com/partner/1234
example.com/blog/hello-world/partner/1234
example.com/archive/january/partner/1234
example.com/static-page/partner/1234

and any other variations which i cant even imagine right now :)

-- 
(en) regards / (pl) pozdrawiam
Konrad Karpieszuk
http://tradematik.pl wtyczka do WordPressa do tworzenia sklepów dla
klientów z Polski


More information about the wp-hackers mailing list