Splash › Forums › PrettyFaces Users › what ever user type in URL redirect to main page
Tagged: air Jordan 5 r, air Jordan ret, air max 2009, cheap air max, http://uklongc, longchamp outl, rewrite
This topic contains 4 replies, has 2 voices, and was last updated by Anonymous 4 years, 4 months ago.
in pretty faces is it possible, what ever user type in URL, then request will redirect to any page( which i want to set like: home or login ) for e.g: http://localhost:8080/myApp/home this is my URL but if user types random keys manually http://localhost:8080/myApp/hodgsdgdsdgsdgsd it redirect to this http://localhost:8080/myApp/home i want that..
You could do something like this with a custom rewrite processor. See the part of the documentation for details:
However I don’t think this will be easy. You will have to make sure that the redirect occurs only for URLs that would result in a 404. This means that you will have to make sure you don’t break your CSS files or graphics.
ok tell me how to i set a page for 404 if user type wrong URL like in your forum PAGE EATEN BY SHARK any idea ?
Just use the <error-page> element in your web.xml:
You don’t even need Rewrite/PrettyFaces for this to work.
thanks will use it soon
You must be logged in to reply to this topic.
Comments are closed.
If you find our tools useful, please consider making a donation to help us stay online and building software!