When you create your Page URL Alias, there is a separate field for the extension ("URL extensions"), you have to put "foo/bar" for the alias, and "aspx" for the extension. You can also put multiple semicolon seperated, such as aspx;html so both foo/bar.aspx and foo/bar.html work.