Zend framework 使用Zend框架重写htaccess
我想重写一个url,比如 localhost/public/5/issue?readerVersion=2.0 到 localhost/public/interface/getissuefile/projectd/5/readerVersion/2.0 我试过这个:Zend framework 使用Zend框架重写htaccess,zend-framework,.htaccess,mod-rewrite,Zend Framework,.htaccess,Mod Rewrite,我想重写一个url,比如 localhost/public/5/issue?readerVersion=2.0 到 localhost/public/interface/getissuefile/projectd/5/readerVersion/2.0 我试过这个: RewriteCond %{REQUEST_FILENAME} -l RewriteRule ^\/(.*)\/issue?readerVersion=(.*)$ \/interface\/getissuefile\/project
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^\/(.*)\/issue?readerVersion=(.*)$ \/interface\/getissuefile\/projectID/$1/readerVersion/$2 [R=301]
但这不起作用。Zend告诉我这个错误:
指定的控制器无效(5)
如何修复此问题?您应该使用路由,而不是与htaccess混淆,RewriteCond%{REQUEST_FILENAME}-l正在检查路径是否是您不想要的符号链接,请尝试删除itZF默认情况下执行此操作。。。只是不要更改.htaccess文件