Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I want to rewrite the dynamic URL https://example.page/detail-view/?mediaId=2316 and get the SEO-frendly URL https://example.page/detail-view/2316 instead. How can I achieve that?
It's okay to keep http://example.com/key_name/key_value simply by passing in your template using
function add_query_arg( 'key', 'value', 'http://example.com' );
get_query_var('key_name')
to fetch the Value of Query parameters in your template file instead of using
$_GET['key_name'] .
detail-view
andmediaid
? Please add this information to the question.