1

I have migrated my site from Wordpress to Confluence, and modified the 404 Error page to redirect to the main domain home page. This works if i type

https://www.freesoftwareservers.com/asdasd

But if you go to an old page, say

https://www.freesoftwareservers.com/index.php/2016/07/24/xymon-home-page/

It takes you to main main confluence page, which is NOT what I want.

The working redirect, redirects you to a "scroll point viewport" @

https://www.freesoftwareservers.com/wiki

But the non-working url above, just takes you to my regular confluence page which is not really supposed to be public. (Its still protected though, its just not as pretty and not the view I want to be public)

Any thoughts?

PS: This is how I handle 404 with confluence (all pages are proxyied thru NGinX)

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>

NginX Config

##Jira
server {
       listen         80;
       server_name    jira.freesoftwareservers.com;

       return         301 https://$server_name/;

}

server {
        listen 443 ssl;
        server_name jira.freesoftwareservers.com;

location / {

        proxy_pass              http://192.168.1.255:8081/;

        include                 /etc/nginx/proxy.conf;
    }
}


#Confluence
server {
       listen         80;
       server_name    freesoftwareservers.com www.freesoftwareservers.com;

       return         301 https://www.freesoftwareservers.com$request_uri;
}

server {
listen 443 ssl;
server_name www.freesoftwareservers.com freesoftwareservers.com;

rewrite     ^/$ /wiki permanent;

location / {

      proxy_pass           http://192.168.1.255:8091/;
      include             /etc/nginx/proxy.conf;

    }
}
FreeSoftwareServers
  • 571
  • 1
  • 6
  • 25

1 Answers1

0

I used

 rewrite ^/index.php /wiki permanent

to make this work

FreeSoftwareServers
  • 571
  • 1
  • 6
  • 25