2001, Volkswagen Golf, 1.4 petrol

Do you have to take off the oil filter to replace an oil pressure switch?And if not where does the switch have to go??