Using keep-alive feature in .htaccess

.htaccess, apache

Solution

You can't control keepalive behaviour in an `.htaccess`. Keepalives are a host-level feature, not one where different directories can behave differently depending on the per-directory htaccess info.

If you are on the kind of basic shared hosting that only gives you `.htaccess` to configure your sites, you can't change the keepalive settings. Presumably the hosting company will have set them appropriately, or just left them on the default settings, which are usually fine.

Problem

I want to use the `keep-alive` feature in Apache. How can I do this with my host (.htaccess file), and what are the best values for the parameters like `KeepAliveTimeout`?

Original source