使用CentOS的LAMP的基本设置。为什么Zend Framework的路由器无法正常工作?

| 因此,我在CentOS上使用LAMP堆栈进行了基本的Web服务器设置。它具有mod_rewrite和所有基本模块。我使用的路由在其他服务器和本地服务器上均有效。但是,当我尝试在新服务器上使用路由时,它们给我一个404错误。现在最重要的是常规默认路由有效(即/ index / my-page有效,但特殊路由/ my-page在此服务器上不可用),所以我知道mod-rewrite可以正确触发。另外,没有带有路径名的实际文件,因此没有冲突。 我的猜测是路由器配置不正确,因为我之前已经以相同的方式完成了此操作,并且没有问题。我想知道是否有人知道我可能想念的路由器可能需要运行的任何潜在小问题。 感谢您的见解。 更新:这是我尝试过的重写htaccess条目
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\\.(js|ico|txt|gif|jpg|png|css)$ index.php
和(来自与我合作的另一个开发人员)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(.*)$ index.php [NC,L]
除了额外的环境标记之外,这是routes.xml:
    <routes>
        <home>
            <route>/home</route>
            <defaults>
                <controller>index</controller>
                <action>index</action>
            </defaults>
        </home>
        <lifetime-solutions-annuity>
            <route>/lifetime-solutions-annuity</route>
            <defaults>
                <controller>index</controller>
                <action>lifetime-solutions-annuity</action>
            </defaults>
        </lifetime-solutions-annuity>
        <indexed-universal-life>
            <route>/indexed-universal-life</route>
            <defaults>
                <controller>index</controller>
                <action>indexed-universal-life</action>
            </defaults>
        </indexed-universal-life>
        <wellness-for-life>
            <route>/wellness-for-life</route>
            <defaults>
                <controller>index</controller>
                <action>wellness-for-life</action>
            </defaults>
        </wellness-for-life>
        <join>
            <route>/join</route>
            <defaults>
                <controller>index</controller>
                <action>join</action>
            </defaults>
        </join>

    </routes>
    
已邀请:
您确定已设置AllowOverride All或至少设置了AllowOverride FileInfo吗?听起来Apache忽略了.htaccess文件。     

要回复问题请先登录注册