2011-12-13 341 views
0

confluence-3.2.1_0
如何在404上重定向到新頁面(在當前空間中創建頁面)404 Atlassian Confluence中的錯誤?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> 
+0

澄清:你想要在編輯模式下以編輯模式打開目標頁面的功能,而不是顯示類似頁面列表的Confluence錯誤頁面? – Underverse

回答

1

/pages/createpage-entervariables.action?spaceKey=KEY

但你沒有鑰匙,所以我認爲你有問題

+0

也許有一些功能獲得空格鍵? – iRoller

0

steps listed here,而不是更新404頁面,你可以更新你的鏈接,這樣如果頁面存在,用戶將被重定向到那裏,否則他們能夠創建頁面。

的鏈接是風格 - 大的

http://xxxxx/pages/createpage.action?spaceKey=experiment&title=this+does+not+exist&linkCreation=true&fromPageId=623770 
0

雖然我的回答有點不同的,(沒有創建頁面,我只是重定向到主SPACE),這裏是它。很簡單,可以根據你的需要量身定做。

注意: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>