Re: Problem with URL rewrite

Splash Forums PrettyFaces Users Problem with URL rewrite Re: Problem with URL rewrite

#20721

Hey Giorgio,

I think rewrite rules are the wrong approach in your situation.

1) at present my server responds showing the IP address, so I’d like to show the internet address (that one that the user inserted).

What do you mean by “responds showing the IP address”? Do you mean that you cannot enter the domain name to access the application? In this case it is a configuration issue. If your domain is set up with the IP address of your server, it should work as you expect it. If not, it is either a DNS or an application server issue.

2) The user would like to see always the same address (i.e. http://www.myDomain.net) without the context part.

You will have to do two things to achieve this:

1. You must configure your container to deploy the application to the root context-path (/). In this case the application will be accessible with http://www.myDomain.net instead of http://www.myDomain.net/my-context-path.

2. If your uses do not want the address in the browser bar to change regardless on which page they are, you may take a look at the following thread:

http://ocpsoft.com/support/topic/constant-url-in-jsf-application

I hope this helps :-)