F5F Stay Refreshed Power Users Networks Pattern matching for Pi hole in regular expressions

Pattern matching for Pi hole in regular expressions

Pattern matching for Pi hole in regular expressions

X
xXMcAw3s0m3Xx
Junior Member
37
01-09-2016, 12:50 PM
#1
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?
X
xXMcAw3s0m3Xx
01-09-2016, 12:50 PM #1

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?

S
Stuji27
Junior Member
42
01-09-2016, 06:16 PM
#2
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.
S
Stuji27
01-09-2016, 06:16 PM #2

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.

T
TheToxickiid
Member
68
01-09-2016, 07:51 PM
#3
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!
T
TheToxickiid
01-09-2016, 07:51 PM #3

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!