How can they detect the programming language in use other than by looking at .php, .aspx, .jsp, etc? You won't see this on a most professionally-authored sites that use a router and RESTful URLs.
That's not what RESTful means. What your URLs look like has absolutely nothing to do with REST -- the whole point is that it treats URLs as opaque references to other similarly hypertextual resources.
I believe via HTTP headers. Sometimes (or maybe by default?) PHP installs will add something PHP-specific to the Server: line. I remember having to go in and disable that at one point...