Redirect to a new page on 404 Error

confluence-4.1(latest)
How to make a redirect to a new page(create page in current space with ${not found page} name) 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?spaceKey=currentSpace&pageTitle=notfoundpagename</location>
 </error-page>
Could you please provide me a right syntax?

2 answers

A different solution to the larger problem is outlined here.

Rather than changing the 404 page, you could change your links to the format-

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

such that-

  • If the page exists, user is redirected to that page.
  • If the page doesn't exist, user is able to create it.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

65 views 0 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you