WordPress Custom Redirect

Job ID: 34318887

Budget: $30 – $250 USD

Are you familiar with the WP Rewrite API? Do you have experience with wp_redirect, get_query_var and other such functions? Perhaps you could help.

My website has a search tool I built that creates a link that is sent to an API that is constructed like this:

https://example.com/coupon/?drug=PHENTERMINE&ndc=10702002501&quantity=30&zipCode=90210&radius=15

I think it is possible to use the Rewrite API to update the htaccess file so that, in the browser URL window, the url looks like this:

https://example.com/coupon/phentermine

Note there are around 8,000 dynamic pages on my site, all are created using this 3rd party API URL structure. The "?drug=" parameter will be the canonical. So, in this example, there are four (4) versions of "phentermine", but all will result in showing the https://example.com/coupon/phentermine while the updated htaccess file will still pass the full url and parameters to the 3rd party REST API.

For an WordPress developer with this kind of experience this should be pretty quick.

In your response, please detail your experience with the WordPress Rewrite API.
Related categories: PHP WordPress Apache MySQL DevOps