Pattern matching for Pi hole in regular expressions
Pattern matching for Pi hole in regular expressions
I set up a Pi Hole on my Raspberry Pi zero. I noticed some ads that I need to block, but they redirect to a JPG image. When I use the exact URL like "cdn.website.com/image.jpg", it doesn't work with blocking rules. Other ads I've blocked are fine, but this one still shows up even after adding the URL to a regex. If I block the site instead of just the image, it might affect the website's functionality or make it load plain text. How can I resolve this without disrupting the site or going back in time?
Remember PiHole acts as a DNS filter. Your browser won't search for full URLs like "cdn.website.com/image.jpg"; it only checks "cdn.website.com" or "website.com". If the site contains parts in both locations, you'll always block at least one. You need a content filter or web proxy for this.
Oh ok. Well I mean those jpgs don't bother me as much the annoying ads are gone so no problem. If in the future I decide to get rid of them I will set up a proxy as well. Thanks for the clarification!