A very complete explanation can be found here
http://www.vivaolinux.com.br/artigo/Apache-22-Introducao-ao-modulo-mod-rewrite?pagina=1
Correcting your question as I understand it you do not need to pass the two values only one would be enough. For example.
www.site.com/2 -> Return all user information named B
or www.site.com/B would also retrieve information from the same correct user?
Because if a number is passed you would do a search based on Identifier and if an Alpha is passed( letters and numbers) you would recover the profile by username.
Google Rewrite_mod search which is an apache module.
the technical term is "Rewrite URL" or "URL rewriting". A popular term is "friendly URL" or "sugary URL". Search by these terms and you will understand what to do.
– Daniel Omine
I have made some explanations about HTACCES on other issues that may serve as a basis: Example 1, Example 2, Example 3
– Papa Charlie
Implementing Router-Friendly URL
– marcusagm