> if (req.url ~ "^/location-staticmap/*" || req.url ~ > "^/staticmap%3F*" || req.url ~ "^/wms/*") { What happens if you put your matches in additional parenthesis? Also, you don't need the asterisks. E.g. in the first regexp, this means "end with and number of slashes or none at all". Nils