Modify template match regex to allow .template?var=12 etc.