그래서 CentOS에서 램프 스택이있는 기본 웹 서버 설정이 있습니다. 그것은 mod_rewrite와 모든 기본 모듈을 가지고 있습니다. 내가 사용한 라우팅은 다른 서버와 로컬에서 작동합니다. 그러나 새로운 서버의 경로를 사용하려고하면 404 오류가 발생합니다. 이제 mod-rewrite가 올바르게 실행된다는 것을 알기 때문에 일반적인 기본 경로가 작동합니다 (예 :/index/my-page는 작동하지만 특수 경로/my-page는이 서버에 없습니다). 또한 경로 이름이있는 실제 파일이 없으므로 충돌이 없습니다.CentOS를 이용한 LAMP 기본 설정. 젠드 프레임 워크의 라우터가 왜 작동하지 않을까요?
제가 생각하기에 라우터에 대한 구성이 올바르지 않습니다. 같은 방식으로하기 전에 문제가 없었습니다. 라우터가 실행해야 할 가능성이있는 작은 것들을 내가 아는 사람이 있다면 내가 놓친 것일 수도 있습니다.
통찰력을 가져 주셔서 감사합니다.
UPDATE : 여기 여기
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 옆이다 (I 함께 일하는 다른 개발자에서) 내가 RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php
및을 시도 다시 쓰기 htaccess로 항목입니다 환경 마크 업 :
<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>
는 serverfault에 속해 있습니다. –
이것은 라우팅 문제가 ZF의 라우팅 규칙과 관련 될 수 있기 때문에 * ServerFault에 속하지 않습니다 *는 서버 구성 문제가 아닙니다. @ gokujou,'.htaccess'와 모든 라우팅 규칙을 보여줄 수 있습니까? – Charles
위의 내용을 추가했습니다. 약 80 %는 ZF가 서버보다 더 많은 문제가 있다고 확신하지만 서버는 가능성이 있습니다. – gokujou