mummana Posted February 6, 2009 Share Posted February 6, 2009 Hi, We are using apache as web server, Jboss as application. Mod_jk is the connector for them. If the webContext name is wrong, how to redirect to 404 page from apache server. Assume that correct page is: http://mysite.com/myapp/login.jsp If any body requested with wrong context name, we need to show page not found page. Example: http://mysite.com/myappA/login.jsp. Please help me regarding. Thanks Srini Quote Link to comment Share on other sites More sharing options...
mummana Posted February 6, 2009 Author Share Posted February 6, 2009 We already added ErrorDocument 404 /404.html in the httpd.conf. But when the web context name is exists, it is not showing the configured 404.html page. Could you please help me regarding? Thanks Srini Quote Link to comment Share on other sites More sharing options...
corbin Posted February 6, 2009 Share Posted February 6, 2009 It wouldn't make sense for Apache to handle the 404 error since it's essentially acting as a proxy. It would have to see what content the app server returns, and Apache isn't designed to do that. No idea how mod_jk works, but if it works anything like mod_proxy, you might be able to check headers or something and handle it accordingly. I wouldn't be surprised if it's not possible though. (It is a proxy-like situation, right? Or am I misunderstanding?) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.