JFinal 配置html伪静态?
程序员文章站
2024-02-12 12:32:46
...
创建一个FakeStaticHandler类
public class FakeStaticHandler extends Handler {
public void handle(String target, HttpServletRequest request, HttpServletResponse response, boolean[] isHandled) {
int index = target.lastIndexOf(".html");
if (index != -1) {
target = target.substring(0, index);
}
nextHandler.handle(target, request, response, isHandled);
}
}
public void configHandler(Handlers me) {
me.addHandler(new FakeStaticHandler());
}
转载于:https://my.oschina.net/ichubei/blog/208564
上一篇: 总结个人thinkphp学习_PHP教程
下一篇: 通过对服务器端特性的配置加强php的安全