I've been struggling trying to wrap my brain around this problem for a few hours. I'm basically trying to achieve this URL structure for a coupon site I run.
http://www.mysite.com/store/walmart/coupon-1
Each coupon is a WP post and the default structure for it now is.
http://www.mysite.com/coupon-1
The store
text is static and if that was the only prefix I needed for a coupon I could easily go into Settings -> Permalink and setup something like this /store/%postname%/
but since the store name is dynamic ... well you see my problem.
I've started off approaching the problem by doing what I know and using a RewriteRule in .htaccess (ex: RewriteRule ^store/(.*)/(.*)$ $2 [R=301,L]
) but that didn't give me the right result, it would just redirect to the original URL structure.
I've found a couple articles on the topic but they're either poorly explained or just refer to a simple redirect. Can anyone shed some light on this for me?