汇流-3.2.1_
如何在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>发布于 2011-12-14 07:18:21
/pages/createpage-entervariables.action?spaceKey=KEY
但是你没有钥匙,所以我觉得你有问题
发布于 2012-11-15 10:41:55
在steps listed here中,您可以更新链接,而不是更新404页面,这样如果页面存在,用户就会被重定向到那里,否则他们就能够创建页面。
链接的风格是-
http://xxxxx/pages/createpage.action?spaceKey=experiment&title=this+does+not+exist&linkCreation=true&fromPageId=623770发布于 2016-10-02 04:33:36
虽然我的答案有点不同,(不创建页面,我只是重定向到主空间),这里是它。非常简单,可以为你想要的量身定制。
注意: 404.vm是fourohfour.action所说的。不要管web.xml,只需编辑404.vm!
sudo mv /opt/atlassian/confluence/confluence/404.vm /opt/atlassian/confluence/confluence/404.vm.original
sudo nano /opt/atlassian/confluence/confluence/404.vm
<!DOCTYPE HTML>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1; url=http://example.com/url">
<script>
window.location.href = "http://example.com/url"
</script>
<title>Page Redirection</title>
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
If you are not redirected automatically, follow the <a href='link'>http://example/url'>link to example</a>https://stackoverflow.com/questions/8490100
复制相似问题