/    Sign up×
Community /Pin to ProfileBookmark

htaccess LIMIT reg express help please

I’m attempting (with limited success) to block google ads in embedded youtube videos. The regular expression needs to deny several urls like:

[CODE]r16.ord12s02.c.youtube.com[/CODE]

…see below….

[CODE]
<Limit GET HEAD POST>
order allow,deny

deny from (.+)c.youtube.com/(.+) <—here’s where I need some help

deny from googleads.g.doubleclick.net
deny from s0.2mdn.net
deny from s.ytimg.com
deny from s.youtube.com
deny from s2.youtube.com
deny from v8.lscache2.c.youtube.com
deny from tc.v8.cache2.c.youtube.com
deny from i4.ytimg.com
deny from i1.ytimg.com
deny from i2.ytimg.com
deny from google.com
deny from pagead2.googlesyndication.com
deny from r16.ord12s02.c.youtube.com
deny from doubleclick.com
deny from sales.liveperson.net
deny from sales.liveperson.com
allow from all
</LIMIT>

[/CODE]

Any help appreciated.

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @bustya spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...