• Resolved tablago

    (@tablago)


    Hi, is it possible to exclude unique css using regular expressions?

    The problem is that the urls I want to exclude, have the same root as the ones

    For example
    cars/name-id123 (to be excluded)
    cars/madrid/ (to keep)

    Important,we are talking about a classified ads site with thousands of pages and most of them are ads urls. I would like to optimise only the categories pages due to server space problems.

    Regards

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

    (@qtwrk)

    Hi,

    sadly not natively

    here is workaround , you can give it a try

    if (preg_match('YOUR_PATTERN', $_SERVER['REQUEST_URI'])) {
        define( 'LITESPEED_CONF', true );
        define( 'LITESPEED_CONF__OPTM__UCSS', false);
    }

    add it at top of your wp-config.php

    , replace the preg_match to your regex pattern

    this should forcefully disable UCSS when matches

    PS: better to set up a test site to test out , to avoid messing up the UCSS data on your live site.

    Best regards,

    • This reply was modified 3 years, 4 months ago by qtwrk.
    Thread Starter tablago

    (@tablago)

    It works perfectly. Thank you very much!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Generate UCSS Exclude’ is closed to new replies.