How can I ensure that response headers set in the .htaccess file are sent?
If the PHP handler is set to CGI, it is not possible to send response headers via the .htaccess file.
To solve this, install suPHP and use the suPHP handler instead.
If you must use the CGI handler you have the following alternative options to set response headers:
- Using the Header function in your php code
- Setting the headers in the Apache virtual host configuration context. To do this create an include according to our documentation.
- Setting the headers in the Apache server configuration context. To do this use the Apache Include Editor in WHM.