【发布时间】:2010-09-04 05:33:26
【问题描述】:
我们正在设置一个 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,脚本会正常运行。我们做错了什么?请帮忙!提前致谢。
【问题讨论】:
标签: apache mod-rewrite