我的客户端网站目前正在使用mod_php在apache服务器上运行.所有应用程序的路由都在.htaccess文件中定义(请参阅下面的代码).现在他正在尝试迁移到运行apache和php-fastcgi的服务器,但路由不再有效.
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule "^noticias/?$" index.php/noticias/frontend/list/ [L,QSA]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
当我访问http://domain.tld/noticias时,我得到了No input file specified,并且在apache error_log中[fcgid:warn] mod_fcgid: stderr: PHP Warning: Unknown: function '1' not found or invalid function name in Unknown on line 0,但如果我直接访问路由http://domain.tld/index.php/noticias/frontend/list/它工作正常.
UPDATE
我找到了一个改变一些框架行为的工作解决方案.如果某人有一个解决方案而不必更改框架(可能是在apache或php配置中),我会慷慨地给予奖励答案.