среда, 20 августа 2014 г.

Рекурсивный рерайт на CGI

Сделал челу пых как cgi (без супхп), у него стала валиться 500 ошибка из-за косяка с рерайтами:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace
r->uri = /cgi-bin/php/index.php
redirected from r->uri = /index.php
redirected from r->uri = /cgi-bin/php/index.php
redirected from r->uri = /index.php
redirected from r->uri = /cgi-bin/php/index.php
redirected from r->uri = /index.php
redirected from r->uri = /cgi-bin/php/index.php
redirected from r->uri = /index.php
redirected from r->uri = /cgi-bin/php/index.php
redirected from r->uri = /index.php
redirected from r->uri = /

Сделал отдельный рерайт для cgi-bin/php, помогло:
RewriteCond %{REQUEST_URI} ^/cgi-bin/php(.*)
RewriteRule . - [L]

Комментариев нет: