<a href="http://hogehoge.net/piyo.php">ヒットする</a> <a href="http://hogehoge.net/piyo.html">ヒットしない</a> <a href="http://hogehoge.php/piyo.html">ヒットしない</a>
a[href$=".php"] { color : red; }