• Hello Frank,

    AO has been doing great so far and using a subs_filter in NGINX to force CDN is awesome, however I changed from:

    subs_filter //www.example.com/wp-content/ //example.netdna-ssl.com/wp-content/;

    to

    subs_filter //www.example.com/wp-content/(.*(\.png)) //example.netdna-ssl.com/wp-content/$1 gir;

    and while AO is enabled the code for only PNG gets revoked and acts like if the line is not there, however the one above to force anything in the path works ok with AO. If I deactivate AO both of them work of course.

    The reason is because there are certain extensions I would like to not to deliver from the CDN cause they are huge.

    Any ideas what might be causing this? Maybe have to delay AO or something like that so it does not conflict?

    Thanks in advance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Frank Goossens

    (@futtta)

    the only thing I can think of is if you have a cdn-url configured in AO as well and the PNG’s are background-images in the CSS. in that case AO will change the PNG-url (despite it being excluded in nginx)?

    frank

    Thread Starter lutechi

    (@lutechi)

    Thanks for the quick reply, however I tried all sorts filetypes and still happening the same. PNG it was just for example, but I did disable the cdn in AO and still the same.

    Basically I would like to pass all through the CDN but background videos (consuming too much bandwidth from CDN per month), which I can do if AO is disabled.

    I can do it with KeyCDN plugin but I was trying to take advantage of the simple nginx method.

    Might have to go back to KeyCDN plugin until can find a workaround.

    Thanks again!

    Plugin Author Frank Goossens

    (@futtta)

    I might have to look into nginx one day, but I have no idea what subs_filter does. Does it change the output-HTML on the fly?

    Thread Starter lutechi

    (@lutechi)

    You should Frank! Nginx is fun and ultra fast. Even easier when using something like EasyEngine which has nice features like SSL, Redis, PHP7, Nginx cache, etc…

    But to the output yes, is basically like a search and replace on the fly from the browser request.

    Plugin Author Frank Goossens

    (@futtta)

    ok, so what happens if you disable HTML optimization?

    Thread Starter lutechi

    (@lutechi)

    Yea when disabled HTML optimization the nginx subs_filter works but then would lose AO HTML part of it ??

    Is just funny that when is not specific looking for certain types of files in Nginx it runs fine.

    Does the HTML module in AO takes care of the noptimize tags? Cause I depend on those a lot ??

    Plugin Author Frank Goossens

    (@futtta)

    if you mean “does HTML module take noptimize into account” then yes, it does.

    weird that HTML minification breaks the subs_filter …

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘NGINX CDN subs_filter Issue’ is closed to new replies.