PHP
downloads | documentation | faq | getting help | mailing lists | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ケース 3: doc_root または user_dir を設定> <ケース 1: 配布制限がないファイルのみを配布
Last updated: Fri, 14 Nov 2008

view this page in

ケース 2: --enable-force-cgi-redirect を使用

このコンパイル時のオプションは、 http://my.host/cgi-bin/php/secretdir/script.php のように URL から直接 PHP を呼び出すことを禁止します。 代わりに、 Web サーバーのリダイレクションにより処理された場合は、 PHP はこのモードでのみ処理を行います。

通常、Apache 用設定でのリダイレクションは、 次の命令を使用して行います。

Action php-script /cgi-bin/php
AddHandler php-script .php

このオプションは、Apache Web サーバーでのみテストされており、リク エストのリダイレクト時に Apache が標準ではないCGI 環境変数 REDIRECT_STATUS をセットすることを前提にしています。 リクエストが直接のものであるか間接のものであるかを示す手段をWeb サーバーが全くサポートしていない場合は、このオプションを使用する ことはできません。この場合、ここで記した CGI 版を実行する他の方法 の内の一つを使用する必要があります。



add a note add a note User Contributed Notes
ケース 2: --enable-force-cgi-redirect を使用
mega-squall at caramail dot com
13-Jan-2008 11:36
Contrary to what was said, you can use arbitrary names for your MIME Type ...
However there's a restriction as it must be a valid MIME Type.
For instance, this is working perfectly :

AddHandler application/x-httpd-php4 .php4
AddHandler application/x-httpd-php5 .php5 .php
AddHandler application/x-httpd-php6 .php6
gelgin at internut dot com
26-Apr-2007 07:08
solaris 9 php4.4.0
i have found you can't use arbitrary names ie.

AddType application/x-httpd-php .php

works

#AddHandler php4-script .php

won't do must be

AddHandler application/x-httpd-php
celtic at sairyx dot org
15-Dec-2006 02:24
Note that force-redirect doesn't work with IIS at all; it'll tell you to go away, as IIS doesn't supply the right variables to PHP.

php.ini tells you to turn it off, so make sure you do.

 
show source | credits | sitemap | contact | advertising | mirror sites