Read header into environment variable in Apache 2.2?

荒凉一梦 提交于 2019-12-12 16:41:34

问题


I want to process a request header using a custom rewrite map.

Therefore I want to have the content of the header in an environment variable.

I have not found a way to do that with mod_headers and/or mod_rewrite.

Any help is appriciated.


回答1:


Mod_rewrite example for the request header "X-Forwarded-For":

RewriteRule .* - [E=X-Forwarded-For:%{HTTP:X-Forwarded-For}]



来源:https://stackoverflow.com/questions/7224561/read-header-into-environment-variable-in-apache-2-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!