Php Zend框架URL问题
URL http://lo c a l h o s t/HelloZend/public/index.php/artist/工作正常,但我不喜欢看到index.php放在那里。 如果URL是http://loccaalhostt/HelloZend/public/artist/则消息为 未找到-未找到请求的URL/HelloZend/public/artist/ 在这个服务器上Php Zend框架URL问题,php,url,zend-framework,Php,Url,Zend Framework,URL http://lo c a l h o s t/HelloZend/public/index.php/artist/工作正常,但我不喜欢看到index.php放在那里。 如果URL是http://loccaalhostt/HelloZend/public/artist/则消息为 未找到-未找到请求的URL/HelloZend/public/artist/ 在这个服务器上 有什么问题吗?我已经尝试配置Apache,但在这种URL类型中,它总是尝试打开文件夹/a r t I s t/,而不是
有什么问题吗?我已经尝试配置Apache,但在这种URL类型中,它总是尝试打开文件夹/a r t I s t/,而不是调用controllera r t I s t或URL中的任何内容。控制器/操作等也存在同样的情况。您需要将.htaccess文件添加到公用文件夹中 .htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
可能重复的请发布您的Apache配置文件。