I don't know how community server are doing it, but here is how i would probably do it.
Just create a page that does exactly that, i mean gets the record displayed in it from the page name.
To get the page name without the extension you can use:
Dim CurrentFileName As String = IO.Path.GetFileNameWithoutExtension(Request.FilePath)
After you have created this page, and checked that it is working, you can use the IO.File.Copy method to copy it to your new location,
with a new name, the name of the id you want to display.
IO.File.Copy("E:\SomeFolder\TemplateFile.aspx", "E:\OtherFolder\" & newId & ".aspx")
Then to get the HTML version you need to save the output of the file.
Read this on how to do that:
http://west-wind.com/weblog/posts/481.aspx
And then ofcourse you save that output to a file on the server, for that read this:
http://aspalliance.com/152