admin管理员组文章数量:1426975
I am monitoring my website (faghatseo) seeing an error about keep alive. I googled this problem, as an solution, there was a code
<IfModule mod_headers.c>
Header set Connection keep-alive
</IfModule>
that you had to place in the .htaccess file in this direction below: /public_html/.htaccess
when I placed the code, error 500 appeared and my website went down!
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. The error is like this
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Obviously, I do not have access to Apache cause i'm using shared hosting service.
Is there any other way to enable keep alive with Cpanel or something?
I am monitoring my website (faghatseo) seeing an error about keep alive. I googled this problem, as an solution, there was a code
<IfModule mod_headers.c>
Header set Connection keep-alive
</IfModule>
that you had to place in the .htaccess file in this direction below: /public_html/.htaccess
when I placed the code, error 500 appeared and my website went down!
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. The error is like this
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Obviously, I do not have access to Apache cause i'm using shared hosting service.
Is there any other way to enable keep alive with Cpanel or something?
Share Improve this question edited Dec 26, 2017 at 13:53 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Dec 26, 2017 at 7:22 S.A.F.S.A.F. 414 bronze badges 1- keep alive has to be used in some cases , you have to make sure you need it first .. – Alireza Amrollahi Commented Dec 26, 2017 at 7:27
1 Answer
Reset to default 1Check out wp_headers
filter:
/**
* Filter WordPress headers before sent
*
* @see https://developer.wordpress/reference/hooks/wp_headers/
*/
function wpse_289493($headers, $wp)
{
foreach ($headers as $key => $value) {
if ('connection' === strtolower($key)) {
unset($headers[$key]);
}
}
$headers['Connection'] = 'Keep-Alive';
return $headers;
}
// Add filter
add_filter('wp_headers', 'wpse_289493', 10, 2);
本文标签: htaccessHow can I enable keep alive (Not accessing to Apache)
版权声明:本文标题:htaccess - How can I enable keep alive (Not accessing to Apache) 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745419664a2657845.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论