Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a header to each request using .htaccess

Tags:

I want to add a custom header to a phpbb installation without touching the code. (Using .htaccess)

The header is:

Strict-Transport-Security: max-age=157680000 

Any ideas?

like image 911
steven Avatar asked Oct 15 '09 06:10

steven


People also ask

How do I add a header to an htaccess file?

To add a custom header to the HTTP response headers, use the set or append option. The set option sets the specified header and replaces any header that has the same name. Alternatively, the append option sets the header if it does not already exist.

How do I create a custom header in request?

Under Custom request headers, click Add header. Enter the Header name and Header value for the custom request header.

What is HTTP request custom header?

Custom HTTP headers are commonly meant to provide additional information that may be pertinent to a web developer, or for troubleshooting purposes. These headers often times begin with X- , however, we'll discuss naming convention further on.


1 Answers

Header add Strict-Transport-Security "max-age=157680000" 

http://httpd.apache.org/docs/2.0/mod/mod_headers.html

like image 95
steven Avatar answered Oct 06 '22 00:10

steven