how do i redirect a 404 error page in jenkins to the login page?

1,085 views
Skip to first unread message

henleys...@gmail.com

unread,
Nov 3, 2015, 8:10:17 AM11/3/15
to Jenkins Users
I'm running the LTS release 1.609.2 and using the windows native install which runs jetty.  How do i redirect the 404 error page to the jenkins login page?

Eric Wood

unread,
Nov 3, 2015, 9:31:17 AM11/3/15
to jenkins...@googlegroups.com
Further question ... it appears that I can add a section in the jenkins.war web.xml as follows:

<error-page>
  <error-code>404</error-code>
  <location>/jspsnoop/ERROR/404</location>
</error-page>
I don't like have to open the war file and modifying it, but it is unclear is there is another way to customize the error code handling.  I would like to redirect it to the login page.  I have a situation where many of my customers are complaining about getting a 404 when they select the build output link embedded in the email. It would seem if they are not authorized to see the page that they would be redirected here. Not sure how to set location in this case.
Seems like this became more of an issue when I started using the folder plugin.  I also use role base strategy.  Any help in how to get around this would be greatly appreciated.



On Tuesday, November 3, 2015 8:10 AM, "henleys...@gmail.com" <henleys...@gmail.com> wrote:


I'm running the LTS release 1.609.2 and using the windows native install which runs jetty.  How do i redirect the 404 error page to the jenkins login page?
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0cd94544-2d6c-49e2-ba66-788236ec3757%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Daniel Beck

unread,
Nov 4, 2015, 6:55:00 PM11/4/15
to jenkins...@googlegroups.com
Don't allow anonymous Overall/Read access, or grant everyone the Job/Discover permission globally.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/284440742.1177163.1446561058146.JavaMail.yahoo%40mail.yahoo.com.
Reply all
Reply to author
Forward
0 new messages