Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 解析url时出错-index.htm/index而不是index/index_Apache_.htaccess_Zend Framework_Zend Server - Fatal编程技术网

Apache 解析url时出错-index.htm/index而不是index/index

Apache 解析url时出错-index.htm/index而不是index/index,apache,.htaccess,zend-framework,zend-server,Apache,.htaccess,Zend Framework,Zend Server,我已经在Lubuntu上安装了Zend Server CE。在Windows上的Zend Server CE上,以及在我的主机上,一切正常 mypublic/.htaccess RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] Re

我已经在Lubuntu上安装了Zend Server CE。在Windows上的Zend Server CE上,以及在我的主机上,一切正常

mypublic/.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]
当我试图进入:

/项目/公共/索引/索引/菜单/图库/类型/2

它向我显示了一个错误:

请求的URL/project/public/index.htm/index/menu/Gallery/type/2 在此服务器上找不到

为什么id会将me.htm添加到索引?

例如/project/public/admin或project/public/index/edit/id/16可以正常工作

附言。 索引控制器 索引作用 菜单-动作


你能给我一个关于在Zend中格式化URL的快速链接吗,因为我不知道为什么索引/菜单不能在windows上工作而不是索引/索引/菜单?

如果你使用的是Zend MVC应用程序,请看一下这个

如果您使用的是模块,那么默认路由应该是

/模块/控制器/动作/参数名称/参数值

或者如果您不使用模块,只需

/控制器/操作/param1name/param1value

如果未提供所有参数,则索引为默认控制器和操作名称