Fix URL extension detection