Conditional Headers in .htaccess

Discussion in 'General' started by ripson, Nov 27, 2017.

  1. ripson

    ripson New Member

    In Apache 2.4.26 and above it's possible to use if else directives, like:

    Code:
    <If "%{HTTP:User-Agent} =~ /(android|blackberry|ipad|iphone|ipod|iemobile|opera\ mobile|palmos|webos|googlebot-mobile)/">
    Header add Link "<https://example.com/fonts/font01.woff2>; rel=preload; as=font; type=font/woff2;"
    </If>
    <Else>
    Header add Link "<https://example.com/fonts/font02.woff2>; rel=preload; as=font; type=font/woff2;"
    </Else>
    Does anyone know how to achieve the same in LSWS?
     
    Last edited: Nov 27, 2017
  2. Pong

    Pong Well-Known Member Staff Member

    Thank you for your feature request. We have noted, but there is no ETA for it.
     
  3. mistwang

    mistwang LiteSpeed Staff

  4. ripson

    ripson New Member

    Cheers!
     

Share This Page