The admintools htmaker command group lets you view, modify, and generate the .htaccess server configuration file.
Gets the current value of a server configuration option.
wp admintools htmaker get <key> [--format=<format>]
<key>The configuration option key (e.g. exptime, autocompress). Use wp admintools htmaker list to see all available keys.
--format=<format>The output format. Accepted values: text (default), json. Use JSON for array values such as hoggeragents.
Get the expiration time setting:
wp admintools htmaker get exptime
Get an array value as JSON:
wp admintools htmaker get hoggeragents --format=json
1