How to set Apache conditional header based on URL?

后端 未结 2 394
一个人的身影
一个人的身影 2020-12-19 03:49

I want to set different HTTP header depending on the URL. In my particular case I want a specific URL (e.g. regex ^/abc$) to have a different header than all th

2条回答
  •  一个人的身影
    2020-12-19 04:09

    This is a one-line alternative taken from documentation:

    Header always set CustomHeader my-value "expr=%{REQUEST_URI} =~ m#^/special_path.php$#"
    

提交回复
热议问题