equivalent to mod_substitute

Discussion in 'Apache Migration/Compatibility' started by jimlongo, Sep 14, 2018.

  1. jimlongo

    jimlongo New Member

    I understand that .htaccess directives would still work.

    Is there an equivalent module to apache's mod_substitute in litespeed so that, for instance, I could put this in .htaccess and rewrite all http output.

    AddOutputFilterByType SUBSTITUTE text/html
    Substitute "s|</body>|<script> /*we will do something here*/ </script></body>|ni" 
  2. Pong

    Pong Well-Known Member Staff Member

    Unfortunately, LSWS doesn't support mod_substitute
  3. jimlongo

    jimlongo New Member

    and no equivalent function?
  4. NiteWave

    NiteWave Administrator

  5. jimlongo

    jimlongo New Member

    Thanks for the suggestion, I don't understand how that would allow me to rewrite http output. Can you elaborate?
  6. NiteWave

    NiteWave Administrator

  7. jimlongo

    jimlongo New Member

    I see, thanks.

    I need something of a more universal application. I need to be able to add tracking to all html output on a server.

    mod_substitute and .htaccess is perfect for that. Let's you change "</body>" to "jstracking</body>" for all pages regardless of cms or sitebuilder, and doing it from an .htaccess directive let's you customize it per domain.
    Last edited: Sep 28, 2018

Share This Page