• Resolved stefa98

    (@stefa98)


    How do I disable the cdn settings on AMP pages?

    I upgrade to v3.2.4 and i add following code into wp-config.php

    if (function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()) {
    define( 'LITESPEED_BYPASS_CDN', true ) ;
    }

    and purge all cache But it does not work

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Could you please try

    use

    define( 'LITESPEED_BYPASS_CDN', true ) ;

    directly, and see if you get CDN URL in amp page ?

    and it above code works , as it disables CDN for all pages , then please try below

    if (function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()) {
    exit;
    }

    does it give you blank page ? or loading as normal ?

    Best regards,

    Thread Starter stefa98

    (@stefa98)

    define( 'LITESPEED_BYPASS_CDN', true ) ;
    It works
    Putting:

    if (function_exists( 'is_amp_endpoint' ) && is_amp_endpoint()) {
    exit;
    }

    in wp-config the AMP page signals to be seen, even after clearing the cache.
    I think that’s the problem

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    in wp-config the AMP page signals to be seen, even after clearing the cache.
    I think that’s the problem

    I didn’t understand , did you see the white/blank page ?

    Best regards,

    • This reply was modified 4 years, 2 months ago by qtwrk.
    Thread Starter stefa98

    (@stefa98)

    No I don’t see the white / blank page in amp by entering that code

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    OK , then please contact AMP plugin support

    it’s their is_amp_endpoint function not working.

    Best regards,

    Thread Starter stefa98

    (@stefa98)

    This is the answer that gave me support. How can I do?

    https://wordpress.org/support/topic/is_amp_endpoint-does-not-work-in-wp-config/

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    OK , here is a quick workaround , less sophisticated

    it may not be perfect, but it should work , add this to wp-config.php

    if (strpos($_SERVER['REQUEST_URI'],'amp') !== false) { 
    define( 'LITESPEED_BYPASS_CDN', true ) ;
    }

    Best regards,

    • This reply was modified 4 years, 2 months ago by qtwrk.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Disable CDN for AMP’ is closed to new replies.