.htaccess - URL Rewriting in Wordpress htaccess -


i've built wordpress site has product page retrieves product info external system using querystring id passed in. www.domain.com/product/?id=n loads wordpress product page loads product info using id.

this works fine.

however, want rewrite url that:

www.domain.com/product/productname/id retrieves www.domain.com/product/?id=n

when add following htaccess, page returns 404 because doesn't exist in wordpress.

rewriterule ^product/productname/(.*)$ ^product/?id=$1 [l]

does know how write rule in such way doesn't hijacked wordpress rewriting?

after doing additional searching, i've found links may started. secret lies in wordpress's add_rewrite_ruleshook. haven't tried these myself yet, looks promising:


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -