Fixing URL regex which was accepting anything that ended with 'api'