We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Yaf_Response_Abstract::setRedirect 注意 和Yaf_Controller_Abstract::forward不同, 这个重定向是HTTP 301重定向 手册是说301重定向,但是实际却是302重定向的
The text was updated successfully, but these errors were encountered:
如果没有添加301HEADER 默认发送的的确是302 这个不是因为yaf遗漏造成的 而是yaf只是用了LOCALTION: XXXXXXX 来REDIRECT 而没有添加301的HEADER LOCATION的默认CODE 就是302 如果需要301 请自己在REDIRECT前添加 Header("HTTP/1.1 301 Moved Permanently"); 或者SETHEADER方法(YAF里有) 当然你也可以修改源代码解决这个问题 让YAF自始至终都是301
Sorry, something went wrong.
我觉得手册就应该描述默认情况下的结果,既然需要自己加header后才是301,不加的情况通常是302,那应该在手册中说明一下,避免误会。
No branches or pull requests
Yaf_Response_Abstract::setRedirect
注意
和Yaf_Controller_Abstract::forward不同, 这个重定向是HTTP 301重定向
手册是说301重定向,但是实际却是302重定向的
The text was updated successfully, but these errors were encountered: