How I set custom headers ONLY for html?

#1
Hello! I have site on WordPress on OLS. I want to set headers for html only.
For example: "link <font as font>" (server push)
If I paste code into "Header operation" in "Context", this headers applies on all static content (css, js, etc)
URI* set "/"
How I apply this code only for my webpages?
 
#3
Thank you for answer, but this no working for me.

I set:
Code:
exp:^.*(html)$
on URI*

Location:
Code:
$DOC_ROOT/0$
and
Code:
/home/$1/public_html$2
and
Code:
$VH_ROOT/0$
Accesible: Yes
Expires: Not set
Header operations:
Code:
link </wp-content/themes/reboot/assets/fonts/wpshop-core.ttf>; rel=preload; as=font; type=font/ttf; crossorigin
But this code not implement on html headers. What i doing wrong?
(CURRENT VERSION: OpenLiteSpeed 1.7.14)
 
#9
Oh, i mean HTML is all webpages on site))
Content-Type: text/html
And i want to apply this code only for webpages, instead of css, js, etc
 
Last edited:

Cold-Egg

Administrator
#10
Then you can try
Code:
URI:         exp:(.*)(/)$
Location:    $DOC_ROOT/
Accessible  Yes
Header Operations link </wp-content/themes/reboot/assets/fonts/wpshop-core.ttf>; rel=preload; as=font; type=font/ttf; crossorigin
 
#11
I managed to rejoice until I realized that WordPress does not allow me to enter the admin console :\
*/wp-admin/* redirects to the main page.
It seems that the developers did not initially plan such functionality.
Apparently, in this case, it remains only to use Litespeed Enterprise, unfortunately(
But it's better to leave everything as it is, I hope someday they will update it
Thanks a lot!
 
Top