Colin, The difference is that servlet mapping doesn't allow regex replacement, whereas mod_rewrite allows:
RewriteRule ^(.*)/mdlx/(.*).html$ $1/$2.mdlx That is completely off-the-cuff, so it might be syntactically wrong. If anyone here isn't familar with mod_rewrite, I highly recommend the URL Rewriting Guide: http://httpd.apache.org/docs-2.0/misc/rewriteguide.html. To paraphrase a famous slogan: mod_rewrite -- Don't Run Your Web Server Without It. --- Noel -----Original Message----- From: Madere, Colin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 19:47 To: 'Tomcat Users List' Subject: RE: Tomcat - a search engine liability?!?! This is certainly no long term and all encompassing solution, but if you had certain Servlets you wanted indexed by a search engine, you can map almost any URL to a servlet in the web.xml. Check servlet spec for details, but I seem to remember the ability to even map a "file.html" to a servlet class of "com.company.mycode.SomeServlet". > -----Original Message----- > From: Noel J. Bergman [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, December 11, 2002 6:25 PM > To: Tomcat Users List > Subject: RE: Tomcat - a search engine liability?!?! > > > ASP, and JSP were the only dynamic extensions I consistantly > > saw that were being indexed. > > > Google does NOT index any servlet, framework class, or cgi file. > > I haven't reviewed your facts for accuracy, so take this with a grain of > salt. But *IF* the world according to Google is as you say it is, and I > needed to use some funky extension, I would consider using mod_rewrite to > rewrite request URLs, and a filter to rewrite URLs in the response data > stream. > > This is similar to an issue recently raised in a thread "static url > routing". In your case, the browser might see > http://host/mypath/mdlx/page.html and you would want tomcat to see > /mypath/page.mdlx. > > Actually, I would always rewrite request URLs, but only rewrite the > response > data stream for a search engine like Google. Waste of cycles otherwise, > and > I'd want to eliminate the rewrite when search engines are more RESTful. > > > Tomcat standalone automatically redirects (http 302) to [welcome file] > > I assume that you mean '/' -- 302 --> '/index.jsp', as in your example of > "http://www.xyz.com [goes to] http://www.xyz.com/index.html"? IIRC, you > can > eliminate the round trip to the browser by rewriting the URL, e.g., > > RewriteRule ^(.*)/$ $1/index.jsp -- or whatever you want to use. > > --- Noel > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
