I am currently working on wordpress. URL 0f site is something like this
example.com/dashboard-form/?din=random12.
I want the url to be like this
example.com/dashboard-form/random.
Thanks in advance
To be added on init:
To register your custom variable ('din' in the question)
add_rewrite_tag('%mycustomvar%','([^&]+)');
To create a re-write rule:
add_rewrite_rule('^product/([0-9]{1,})/?','index.php?p=4&mycustomvar=$matches[1]','top')
For more please refer below link:
Try to add rewrite rule and let me know if any query.