Мы настраиваем API и хотим использовать Apache mod_rewrite, чтобы направить все обращения к http://api.domain.com к сценарию, расположенному в /cgi-bin/api.pl. Вот что мы в настоящее время используем:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^api.domain.com$ [NC]
RewriteRule ^(.*)$ /cgi-bin/api.pl [NC,L,QSA]
Однако, это дает нам следующую ошибку:
[Fri Sep 03 14:18:32 2010] [error] [client 67.180.34.0] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
[Fri Sep 03 14:18:32 2010] [error] [client 67.180.34.0] 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.
Если мы пытаемся получить доступ к http://domain.com/cgi-bin/api.pl скрипт работает правильно. Что мы делаем не так? Пожалуйста помоги! Заранее спасибо.