moves rewrite_rules to location_header

so it can be used by all location-types