response.sendRedirect(newUrl) it works fine, on condition to put this call into a groovy file before all freemarker files
Eric On Tue, 2010-06-08 at 11:44 +0200, Jacques Le Roux wrote: > http://tuckey.org/urlrewrite/ ? > > Jacques > > From: "eric" <[email protected]> > > Thanks Adrian & BJ, > > > > I use RewriteRule from Apache for basic rules > > For a 2nd level, I want to check not the url structure but : > > _ vocabulary words present into url (to redirect to the canonical url) > > _ content page (no product ... to redirect to parent page with content) > > > > For many thousands url, I can't use RewriteRule from Apache, it's too > > complicated for me. > > Now I use <meta http-equiv="refresh" content="0;canonicalUrl"> > > but this solution loads the content of a wrong url > > > > So I need an intermediate solution beetween RewriteRule and HTML refresh > > This solution has to be called from OFBiz > > > > Eric > > > > > > On Mon, 2010-06-07 at 17:20 -0700, BJ Freeman wrote: > >> if you using AJP then I suggest rewrite in apache > >> http://httpd.apache.org/docs/2.2/misc/rewriteguide.html > >> you can use regex > >> > >> ========================= > >> BJ Freeman > >> http://bjfreeman.elance.com > >> Strategic Power Office with Supplier Automation > >> <http://www.businessesnetwork.com/automation/viewforum.php?f=52> > >> Specialtymarket.com <http://www.specialtymarket.com/> > >> > >> Systems Integrator-- Glad to Assist > >> > >> Chat Y! messenger: bjfr33man > >> Linkedin > >> <http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro> > >> > >> > >> eric sent the following on 6/7/2010 4:36 PM: > >> > Hi, > >> > > >> > (I havn't had a response from the dev mailing list) > >> > > >> > To avoid error or multiple urls for one page (SEO) or no content > >> > I check the browser url with the original page url > >> > If the bowser url is wrong, i want to redirect the visitor to the right > >> > url > >> > I don't want to use an HTML refresh. > >> > > >> > If a call "response.sendRedirect('newUrl')" in groovy or ftl file > >> > I have the error "IllegalStateException" > >> > > >> > Do you have an idea ? > >> > There is an other solution ? > >> > > >> > Thanks > >> > > >> > Eric > >> > > >> > > >
