Add a custom header with htaccess

To add a custom header using htaccess, you can use the `Header` directive:

Header set Fser "I was here hehe"

And it just works as expected:

$ curl -I localhost/headerset/
HTTP/1.1 200 OK
Server: nginx/1.2.1
Date: Fri, 19 Sep 2014 17:33:19 GMT
Content-Type: text/html;charset=UTF-8
Connection: keep-alive
Fser: I was here hehe
Vary: Accept-Encoding

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.