0

If I mess with the file name in the URL it doesn’t redirect to 404 pageFor example.

       http://10.2.3.22/xyz/404ewewqewqe.html  - This url does not work
       http://10.2.3.22/xyz/404, These 3 urls works fine 
       http://10.2.3.22/xyz/404ewqewqe,http://10.2.3.22/xyeewewqeweollows -

In Apache httpd file i have following entry as follows - ErrorDocument 404 /404.html Any help or pointer would be highly appreciated

Gaurav
  • 259
  • 4
  • 16

1 Answers1

0

I'm not sure of understand your problem but why not use the Web.xml :

<error-page>
   <exception-type>404</exception-type>
   <location>/404error.html</location>
</error-page>

Be careful with servlet version : How to specify the default error page in web.xml?

I use :

<error-page>
    <exception-type>com.sun.faces.context.FacesFileNotFoundException</exception-type>
    <location>/app/error.xhtml</location>
</error-page>

I hope this could help you.

Community
  • 1
  • 1
Julien Malige
  • 3,295
  • 1
  • 20
  • 39
  • This set up has been configured in such a way that we cannot move this to web.xml. Do you see any issue with Apache error document configuration to handle this behavior. – Gaurav Mar 14 '14 at 02:44
  • The syntax is simple and seems correct.. Isn't it a right problem ? http://stackoverflow.com/questions/4341263/custom-error-page-in-apache2-for-401 – Julien Malige Mar 14 '14 at 09:05