I want to change url structure of page in wordpress
from:http://example.com/page-name/?id=rd123
to:http://example.com/page-name/rd123/
I have tried below code in .htaccess, I am getting ID if i use id numeric(123), but I am getting 404 page not found error if use id alphanumeric(rd123).
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^page-name/([a-zA-Z0-9-]+)/?$ pagename.php?id=$1 [L]
</IfModule>
what i am missing in above code, it is in wordpress and i am not getting any perfect solution. here, page-name is template.
pagename.php?id=rd123orpage-name/?id=rd123??? Because here-and/can change the result !