Hi,
Is there a possibility to change the .htaccess file dynamically, when a particular Modx-setting is changed ?
(It is to make my client to switch on/off the Varnish Cache of the one.com hosting, and I don't want him to dive in the htaccess code himself, even if it's only changing a "#" on one line).
Thanks !
There's no System Event fired for a change in a System Setting. If there were, you could do it pretty easily in a plugin. ClientConfig lets you set System Settings, but I don't think it fires any events or allows any postHooks.
You could create a form with a couple of radio options and use a custom snippet to process it. The snippet could set the System Setting, and rewrite .htaccess. The change wouldn't take effect until the next request.