java - Generate redirects from a list in Jakarta Tomcat -


i'm pretty experienced in html, css, javascript, sql, iis, , little apache, have no knowledge of java or tomcat. have client low budget , legacy web site based on proprietary cms (an ancient version of this) built on jakarta tomcat. upgrading not option , paying tms develop not option. i'm cheaper.

the urls of pages , documents on site tend pretty long , not meaningful humans. 1 reason or when doing promotions want shorter urls particular content. example may want http://{server}/naftir.html redirect http://{server}/cmspreview/content.jsp?id=com.tms.cms.section.section_1013_sub_options.

i've solved kludge of putting (for example) naftir.html file in root directory of server , writing redirects in there. {whatever}.html files piling , seems there should better solution. e.g. edit 404 file in list (or mysql table) of short names , desired redirects redirection if found, otherwise display 404. or other method based on list of short names , redirect urls rather loads of files.

any ideas?

you can configure lot of kind of stuff using tool called urlrewrite. it's filter configure in web-inf/web.xml run urls want re-map. then, there "rewrite" configuration file can map specific incoming urls outgoing urls. can use parametric replacements mapping /foo/* /a/b/c/d/*.

you can simplify configuration mapping urlrewrite filter all urls, lose bit of performance on urls aren't rewritten.


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -