OpenCMS - 301 重定向
有没有简单的方法可以在 openCMS 上配置永久重定向(301)?我想将一些旧页面网址转发到新位置。
谢谢
Is there any easy way to configure permanent redirects (301) on openCMS? I would like to forward some of my old page urls to their new location.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现 UrlRewriteFilter (http://tuckey.org/urlrewrite/) 非常好用,并且解决了我的问题!
I found UrlRewriteFilter (http://tuckey.org/urlrewrite/) to be quite nice to work with and solved my issue!
您可以创建一个 JSP 模板,它除了发送 301 永久重定向之外什么也不做。我这样做了并且有效。
根据您的要求,您可以将新 URL 放入属性中或自动修改 JSP 模板中的旧 URL。
You can create a JSP-template which does nothing else than to send a 301 Permanent Redirect. I did that and it works.
Depending on your requirements you can put the new URL in a property or automatically modify the old URL in the JSP-template.