{"id":4083,"date":"2009-06-16T21:43:15","date_gmt":"2009-06-16T12:43:15","guid":{"rendered":"https:\/\/www.pistolfly.com\/weblog\/?p=4083"},"modified":"2017-10-10T14:53:18","modified_gmt":"2017-10-10T05:53:18","slug":"post-83","status":"publish","type":"post","link":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html","title":{"rendered":"Appending request headers to a request forwarded by mod_rewrite"},"content":{"rendered":"<p>Set an environment variable using env flag in RewriteRule and use it in RequestHeader append.<\/p>\n<pre class=\"prettyprint\">  RewriteEngine on\r\n  RewriteRule ^\/(.*)$ http:\/\/appserver\/$1 [P,L,QSA,env=ORG_REMOTE_ADDR:%{REMOTE_ADDR}]\r\n  ProxyPassReverse \/ http:\/\/appserver\/\r\n  RequestHeader append X_ORG_REMOTE_ADDR %{ORG_REMOTE_ADDR}e env=ORG_REMOTE_ADDR\r\n  RequestHeader append X-Forwarded-Proto https\r\n<\/pre>\n<p><a href=\"http:\/\/httpd.apache.org\/docs\/2.2\/mod\/mod_rewrite.html\" target=\"_blank\">mod_rewrite - Apache HTTP Server<\/a><br \/>\n<a href=\"http:\/\/blog.livedoor.jp\/t100life\/archives\/51954482.html\" target=\"_blank\">\u305f\u307e\u306d\u304e\u30d7\u30ed\u30b0\u30e9\u30de\u30cf\u30de\u30ea\u65e5\u8a18:Apache\u5185\u306eCGI\u74b0\u5883\u5909\u6570\u3092Tomcat\u306b\u6e21\u3059\u3002 - livedoor Blog\uff08\u30d6\u30ed\u30b0\uff09<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Set an environment variable using env flag in RewriteRule and use it in RequestHeader append. RewriteEngine on &hellip; <a href=\"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Appending request headers to a request forwarded by mod_rewrite<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"834","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-4083","post","type-post","status-publish","format-standard","hentry","category-apache","en-US"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Appending request headers to a request forwarded by mod_rewrite - Pistolfly<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Appending request headers to a request forwarded by mod_rewrite - Pistolfly\" \/>\n<meta property=\"og:description\" content=\"Set an environment variable using env flag in RewriteRule and use it in RequestHeader append. RewriteEngine on &hellip; Continue reading Appending request headers to a request forwarded by mod_rewrite &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html\" \/>\n<meta property=\"og:site_name\" content=\"Pistolfly\" \/>\n<meta property=\"article:published_time\" content=\"2009-06-16T12:43:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-10-10T05:53:18+00:00\" \/>\n<meta name=\"author\" content=\"Pistolfly\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Pistolfly\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html\"},\"author\":{\"name\":\"Pistolfly\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"headline\":\"Appending request headers to a request forwarded by mod_rewrite\",\"datePublished\":\"2009-06-16T12:43:15+00:00\",\"dateModified\":\"2017-10-10T05:53:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html\"},\"wordCount\":37,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"articleSection\":[\"Apache\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html\",\"name\":\"Appending request headers to a request forwarded by mod_rewrite - Pistolfly\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\"},\"datePublished\":\"2009-06-16T12:43:15+00:00\",\"dateModified\":\"2017-10-10T05:53:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/en\\\/2009\\\/06\\\/post-83.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u30db\u30fc\u30e0\",\"item\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Appending request headers to a request forwarded by mod_rewrite\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#website\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/\",\"name\":\"Pistolfly\",\"description\":\"Developer Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/#\\\/schema\\\/person\\\/e779e918730b507907b3a35b77a9a2ab\",\"name\":\"Pistolfly\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\",\"caption\":\"Pistolfly\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g\"},\"description\":\"Software Engineer in Tokyo, Japan\",\"url\":\"https:\\\/\\\/www.pistolfly.com\\\/weblog\\\/author\\\/pistolfly\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Appending request headers to a request forwarded by mod_rewrite - Pistolfly","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html","og_locale":"en_US","og_type":"article","og_title":"Appending request headers to a request forwarded by mod_rewrite - Pistolfly","og_description":"Set an environment variable using env flag in RewriteRule and use it in RequestHeader append. RewriteEngine on &hellip; Continue reading Appending request headers to a request forwarded by mod_rewrite &rarr;","og_url":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html","og_site_name":"Pistolfly","article_published_time":"2009-06-16T12:43:15+00:00","article_modified_time":"2017-10-10T05:53:18+00:00","author":"Pistolfly","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Pistolfly"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html#article","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html"},"author":{"name":"Pistolfly","@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"headline":"Appending request headers to a request forwarded by mod_rewrite","datePublished":"2009-06-16T12:43:15+00:00","dateModified":"2017-10-10T05:53:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html"},"wordCount":37,"commentCount":0,"publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"articleSection":["Apache"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html","url":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html","name":"Appending request headers to a request forwarded by mod_rewrite - Pistolfly","isPartOf":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#website"},"datePublished":"2009-06-16T12:43:15+00:00","dateModified":"2017-10-10T05:53:18+00:00","breadcrumb":{"@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pistolfly.com\/weblog\/en\/2009\/06\/post-83.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u30db\u30fc\u30e0","item":"https:\/\/www.pistolfly.com\/weblog"},{"@type":"ListItem","position":2,"name":"Appending request headers to a request forwarded by mod_rewrite"}]},{"@type":"WebSite","@id":"https:\/\/www.pistolfly.com\/weblog\/#website","url":"https:\/\/www.pistolfly.com\/weblog\/","name":"Pistolfly","description":"Developer Blog","publisher":{"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pistolfly.com\/weblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pistolfly.com\/weblog\/#\/schema\/person\/e779e918730b507907b3a35b77a9a2ab","name":"Pistolfly","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g","caption":"Pistolfly"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/0b3ddb2859adabf28a2b97ae9fff98772ddffc46088d11cad2b9a2cef66115e7?s=96&d=mm&r=g"},"description":"Software Engineer in Tokyo, Japan","url":"https:\/\/www.pistolfly.com\/weblog\/author\/pistolfly"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paorzz-13R","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/comments?post=4083"}],"version-history":[{"count":3,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4083\/revisions"}],"predecessor-version":[{"id":4086,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/posts\/4083\/revisions\/4086"}],"wp:attachment":[{"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/media?parent=4083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/categories?post=4083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pistolfly.com\/weblog\/wp-json\/wp\/v2\/tags?post=4083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}