I want to make it so that every website on the server I manage (including my own website) will enable keep-alive on all (HTTP status 301) redirect pages including ones issued by apache modules.

This means when I try to get the headers of the page, I should see connection: keep-alive in the header.

Is there a special setting in apache I could use for this? using mod_rewrite would cause me to rescript all my rules but it wouldn't help with apache's mod_dir because someone trying to access a folder without the correct number of slashes will be redirected and mod_rewrite can't control that.

1 Answer 1


you can try to add header

Header set Connection keep-alive 

Context: server config, virtual host, directory, .htaccess

Link to official doc : mod_headers

  • Where are you suggesting this be added? Commented Jan 5, 2016 at 0:33
  • I updated the answer to add more information
    – Froggiz
    Commented Jan 5, 2016 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.