How can I rewrite / redirect URL's in Glassfish V3?
Posted
by
Jin Liew
on Server Fault
See other posts from Server Fault
or by Jin Liew
Published on 2010-08-12T04:55:39Z
Indexed on
2011/03/04
7:26 UTC
Read the original article
Hit count: 575
url-rewriting
|glassfish
Hi, I'd like to simplify the URL's to access a Glassfish V3 application by removing file extensions and otherwise shortening URL's.
I've already set my application as the default application, so that there is no need to include the context root in the URL.
I'd like to:
* Remove file extensions
* Shorten the URL to files deep in the folder structure
I'd like to do this using pattern matching rather than on a per file basis (Site is small at the moment but will change frequently and grow).
Some examples of what I'd like to do:
* foo.com/bar.html -> foo.com/bar
* foo.com/folder1/folder2/bar2.html -> foo.com/bar2
Any help would be greatly appreciated. Thanks.
Cheers,
Jin
© Server Fault or respective owner