[%
path = query.orig;
pathfile = '';
FOREACH folder IN path.split('/');
IF folder.search('.html');
pathfile = pathfile _ folder;
ELSE;
pathfile = pathfile _ folder _ '/';
END;
END;
IF pathfile.search('.html');
pathfile;
ELSE;
pathfile _ 'index.html';
END;
%]