I think you'd have to manually type out the letters A-Z and have them link to something such as index.php?sort=a&by=asc
The next part I wouldn't be sure on how to go about, there is probably a better way than what I'm thinking... but....
Use
strlen() to count the characters of the url name, then use
substr() to subtract all the characters except the first one and do an if() statement saying that if that first character is equal to $_GET['sort'] then display it, otherwise don't mess with it
Hope this helps, I could code it up if you want a better example...