rewrites DO happen at the .htaccess level, but who says you can't check from PHP? :-)
if( in_array("mod_rewrite", apache_get_modules()) ) echo "You've got it, baby";
note that I looked @ phpinfo() to see if this was possible-- in general, if you can see it in phpinfo() then there's probably a way to fetch it programatically.
E