Search code examples
httpwebweblogic

Server side URL redirect


I have a long URL that points to initial page of the website and I want to make it simple so user can remember it. I don't want to do client-side redirects, I want to do it on server side to make it faster. I use Weblogic as a web-server.

Is there a way to redirect from say http://aaa.com/subproject to http://aaa.com/Project/subproject/index.html? What files should I modify achieve that?


Solution

  • Do you only want to do this for the first url?

    If only the first, just create an entry in web.xml pointing the <welcome-file>index.jsp</welcome-file> to some index.jsp in the root for the webapp named subproject.

    In this index.jsp, do a jsp:forward to the actual url you want.