includes/Edge/class-server-rules.php
Server_Rules class for the PerformanceOptimise plugin.
Class Server_Rules
Class Server_Rules
class Server_Rulespublicstatic get_server_type()
public static function get_server_type(): stringDetect the current server software.
Return: string — \’apache\’, \’nginx\’, \’litespeed\’, or \’other\’.
publicstatic is_litespeed()
public static function is_litespeed(): boolCheck if the current server is LiteSpeed / OpenLiteSpeed.
Return: bool — True if LiteSpeed or OpenLiteSpeed is detected.
publicstatic supports_htaccess()
public static function supports_htaccess(): boolWhether the current server reads `.htaccess` files.
Return: bool — True when an `.htaccess` write is meaningful.
publicstatic should_skip_htaccess_write()
public static function should_skip_htaccess_write(): boolWhether `.htaccess` writes must be skipped on this server.
Return: bool — True when the `.htaccess` write must be skipped.
publicstatic get_nginx_rules()
public static function get_nginx_rules(): stringGet performance rules for Nginx configuration.
Return: string — Nginx configuration snippet.
publicstatic get_apache_rules()
public static function get_apache_rules(): stringGet Apache rules (proxied from Htaccess_Handler).
Return: string — Apache rules snippet.
Hooks
Hooks referenced in includes/Edge/class-server-rules.php: Hook Type Line Notes wppo_litespeed_nextgen_rewritefilter 178 @param ×1 wppo_nginx_nextgen_rulesfilter 214 @param ×1 wppo_nginx_purge_fallback_rulesfilter 299 @param ×1 wppo_nginx_rulesfilter 310 @param ×1