New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于 Apache 中路由无法生效的问题 #87
Comments
那你要看看是不是apache的rewrite没写对啊 |
RewriteEngine On 是这样设置的。 |
其他的路由都是好的,就这条不行,感觉像是正则没有匹配一样。 |
PATH_INFO打开了么? |
是需要 _SERVER 的 PATH_INFO 变量吗? |
谢谢大大,已确认是 PATH_INFO 的问题,换个环境就好了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
现在想自定义这么一个路由规则:
$route = new Yaf\Route\Regex(
"#^/data/([^/]+)/([^/])+#", array('controller' => ":name", 'action'=>":action"), array( 1 => "name", 2=>"action" )
);
$dispatcher->getRouter()->addRoute('data', $route);
$routes = Yaf\Dispatcher::getInstance()->getRouter()->getRoutes();
页面提示:
Error Msg:Failed opening controller script E:\Sync\Works\Yaf\portal\controllers:name.php: No such file or directory
但奇怪的是在 Nginx 下却完全正常。
我想要匹配的是:
c1.yaf.com/data/groupon/test
期待大大帮忙。
The text was updated successfully, but these errors were encountered: