location /{
root /app/work/WebRoot;
set $request_filename_real $request_filename;
if ($uri ~* ^(.*)/$) {
set $request_filename_real ${request_filename}index.html;
}
if (!-e $request_filename_real) {
rewrite ^/(.*)\.html http://$host/$1.jhtml ;
rewrite ^(.*)/ http://$host$1/index.jhtml ;
}
index index.html
}