1

サーバー上にディレクトリがあるとしましょう Loacated Really FAR

server1.{domainUS}/maindir/

しかし、私はメインサーバーを持っています

{ドメイン.UK}

私のリモートサーバーはhttpがメインサーバー 経由でのみ送信されることを許可しているため、他のサーバーを指すのではなく、メインサーバーを指すサブドメインを作成したいと思います....そのため、完全なファイルを転送するスクリプトのようなPHPプロキシが必要ですメインサーバーへのディレクトリserver1.{domainUS}

例..

server1.{domainUS}/maindir/testube/testfile.html <==test file
proxy.{domain.UK}/testube/testfile.html  <==test file

Example2、php クエリなどとうまく連携させるためにも必要です。

server1.{domainUS}/maindir/testube/testfile <==test php document
proxy.{domain.UK}/testube/testfile  <==test php document
4

1 に答える 1

0

このコードをサーバー構成に入れますserver1.{domainUS}(Apacheを想定):

<Directory "maindir/">
    RewriteEngine On
    RewriteCond %{QUERY_STRING} (.*)
    RewriteRule ^(.*?)$ http://google.com/%{PATH_INFO}
</Directory>

または、構成を変更できない場合は、Directoryタグの内容を.htaccessファイル内に配置できますmaindir

于 2012-08-10T23:30:52.710 に答える