The alias() function is provided by PGalias.pm and is currently designed to work only for a few file extensions (.html, .png, and .gif come to mind, but there are probably a few others that are also supported by the PGalias.pm code). For several years now, Mike Gage has said that PGalias.pm ought to be rewritten (or at least extended) to include more file extensions, such as .pdf, .txt, .js, etc.
Basically, what alias() does is to copy the file from the directory that contains the the .pg file (which is not available to the world) to a newly created and randomly named directory/file (which is available to the world). Then, it points the user to the copy of the file in the randomly named directory/file.
Would anyone be willing to work on PGalias? Are there any file extensions that alias() ought to support that it does not right now?