Atlassian Confluence - 在 404 错误上重定向到新页面
confluence-3.2.1_0
如何在 Atlassian Confluence 中出现 404 错误时重定向到新页面(在当前空间中创建页面)?
我想我需要将 web.xml 中的操作更改
<error-page>
<error-code>404</error-code>
<location>/fourohfour.action</location>
</error-page>
为:
<error-page>
<error-code>404</error-code>
<location>/createpage.action</location>
</error-page>
confluence-3.2.1_0
How to make a redirect to a new page(create page in current space) on 404 Error in Atlassian Confluence?
I think I need to change action in web.xml:
<error-page>
<error-code>404</error-code>
<location>/fourohfour.action</location>
</error-page>
To something like:
<error-page>
<error-code>404</error-code>
<location>/createpage.action</location>
</error-page>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
/pages/createpage-entervariables.action?spaceKey=KEY
但你没有密钥,所以我认为你有问题
/pages/createpage-entervariables.action?spaceKey=KEY
but you don't have the key so I think you have a problem
来自 此处列出的步骤,您可以更新链接,而不是更新 404 页面,以便如果该页面存在,用户将被重定向到那里,否则他们能够创建页面。
链接的样式是-
From the steps listed here, instead of updating the 404 page you could update your links so that if the page exists, the user is redirected there, otherwise they are able to create the page.
The links are of the style-
虽然我的答案有点不同(没有创建页面,我只是重定向到主空间),但这就是它。非常简单,可以根据您的需求进行定制。
注意:404.vm 是 fourohfour.action 所调用的。只需保留 web.xml 并编辑 404.vm!
While my answers a bit different, (no create page, I just redirect to main SPACE), here is it. Very Simple and could possible be tailored for what you want.
Note: 404.vm is what is called by fourohfour.action. Just leave web.xml alone and edit 404.vm!