私は、私はこのようなサーバーを使用しているセットアップがあります。ApacheのヘッダにSCRIPT_URIを書き込むにはどうすればよいですか?
ロードバランサを - >アパッチ - > Tomcatの
私は、クライアントがヘッダーに使用するURLを記述するようにApacheをしたいと思いますので、私はそれを読むことができますかつて私はtomcatをヒットした。
私はmod_rewriteとmod_headersを使用しようとしましたが、それはやっていますが運がありません。 私はhttp://httpd.apache.org/docs/2.0/mod/mod_rewrite.htmlを見れば、私がSCRIPT_URIという変数が必要であることを明確に思える:
SCRIPT_URI=http://en1.engelschall.com/u/rse/
私もこのhttp://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.htmlでとても十分なヘッダを作成する方法を考え出すといくつかの大成功を持っていたではなく見えました。
私はApacheサーバにphpをインストールしていますが、もしphpinfo()を見ると、SCRIPT_URIはそこにあり、分かりやすい値を持っています。
ヘッダーに書き込むことができません。ここで私がやったの簡易版だ:
#load modules
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
#Get the original uri used
RewriteRule .* - [E=INFO_SCRIPT_URI:%{SCRIPT_URI},NE]
RequestHeader set x-orig-uri "%{INFO_SCRIPT_URI}e"
私はすべてのアイデアは
いくつかの他のオプションを試してみましたが、Windows上の両方、CygwinとUbuntu Linuxのきましたか?
私は答えとしてマークしています。 –