It appears that as of 5.3.0, --enable-force-cgi-redirect is not a valid configure option. A quick review of the 5.3.0 code indicates that it the logic previously enabled by specifying the --enable-force-cgi-redirect configure option is being built into php by default.
방법 2: --enable-force-cgi-redirect 사용
이 컴파일시의 옵션은 누구라도 http://my.host/cgi-bin/php/secretdir/script.php와 같은 URL을 통해서 PHP를 직접 호출할 수 없게 합니다. 대신, 이 모드에서 PHP는 웹서버의 리다이렉트 규칙에 따를 때만 해석을 시도할 것입니다.
아파치에서 리다이렉션의 설정은 다음과 같은 지시어로 설정합니다:
Action php-script /cgi-bin/php AddHandler php-script .php
이 옵션은 아파치 웹 서버에만 테스트되었고, 리다이렉트된 요청에 대해 아파치가 비표준 CGI 환경 변수 REDIRECT_STATUS를 설정하게 합니다. 웹 서버가 요청이 직접적인지 리다이렉트된 것인지의 구분을 제공하지 않는다면, 이 옵션을 사용할 수 없고, 이 문서에 제시된 다른 방법의 CGI 실행 방법을 이용해야 합니다.
방법 2: --enable-force-cgi-redirect 사용
harvey dot eneman at oracle dot com
01-Jul-2009 08:29
01-Jul-2009 08:29
mega-squall at caramail dot com
14-Jan-2008 07:36
14-Jan-2008 07: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 02:08
26-Apr-2007 02: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 10:24
15-Dec-2006 10: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.
