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.
Caso 2: usando --enable-force-cgi-redirect
Essa opção em tempo de compilação previne que qualquer usuário chame o PHP diretamente com uma URL como http://my.host/cgi-bin/php/secretdir/script.php. Ao invés disso, o PHP só executará nesse mode se passar por uma regra de redirecionamento do servidor.
Normalmente o redirecionamento na configuração do Apache é feita com as seguintes diretivas:
Action php-script /cgi-bin/php AddHandler php-script .php
Essa opção só foi testada com o servidor Apache, e confia no Apache para configura a variável de ambiente não-padrão do CGI REDIRECT_STATUS em requisições redirecionadas. Se seu servidor web não suporta nenhuma maneira de dizer se a requisição é direta ou rediracionada, você não pode usar essa opção e você deve usar uma das outras maneira de executar a versão do CGI documentada aqui.
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
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.
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
