The Mod- Rewrite function
The Mod- Rewrite function Perform URL rewriting.
URL manipulation, also called URL rewriting, is the process of altering (often automatically by means of a program written for that purpose) the parameters in a URL (Uniform Resource Locator). URL manipulation can be employed as a convenience by a Web server administrator, or for nefarious purposes by a hacker.
Automatically Redirect Your Old URLs. Now that the URL rewriting is in place, you probably want Google to forget about your old URLs and start using the new ones. ... In fact, you could add another rule to .htaccess to achieve this, but if you get the rules in the wrong order, then the browser would go into a redirect loop.
URL rewriting is a method in which the requested URL is modified to include a session ID. There are several ways to perform URL rewriting. You are going to look at one method that is provided by the Servlet API.