Thanks Dan, Actually I did something pretty similar (changing OK to DECLINED in wam_match), knowing that after a handler in the url rewrite stage has returned OK no other (such as mod_rewrite) gets a look in. However, this still didn't work for me, even though mod_rewrite in the logs said it'd rewritten / as /index.jsp, I still got the 302?
James ----- Original Message ----- From: Dan Lindy <[EMAIL PROTECTED]> To: James Williamson <[EMAIL PROTECTED]>; Edam Cheeseman <[EMAIL PROTECTED]> Cc: Tomcat Users List <[EMAIL PROTECTED]> Sent: Friday, March 15, 2002 4:20 PM Subject: Re: OFFTOPIC: apache mod_rewrite > James et al., > > I use hacked version of mod_webapp.c on Apache 1.3 to do exactly this. > My modifications may be crude, but it's worked well for me so far: > > /* Match an Apache request */ > static int wam_match(request_rec *r) { > wa_virtualhost *host=NULL; > // wa_application *appl=NULL; > // wa_chain *elem=NULL; > > /* Paranoid check */ > if (!wam_initialized) return(DECLINED); > > /* Check if this host was recognized */ > host=ap_get_module_config(r->server->module_config,&webapp_module); > if (host==NULL) return(DECLINED); > > // /* Check if the uri is contained in one of our applications > root path */ > // elem=host->apps; > // while(elem!=NULL) { > // appl=(wa_application *)elem->curr; > // if (strncmp(appl->rpth,r->uri,strlen(appl->rpth))==0) break; > // > // appl=NULL; > // elem=elem->next; > // } > // if (appl==NULL) return(DECLINED); > > /* The uri path is matched: set the handler and return */ > r->handler=ap_pstrdup(r->pool,"webapp-handler"); > > // /* Set the webapp request structure into Apache's request > structure */ > // ap_set_module_config(r->request_config, &webapp_module, appl); > // return(OK); > return(DECLINED); // added > > } > > /* Handle the current request */ > static int wam_invoke(request_rec *r) { > server_rec *svr=r->server; > conn_rec *con=r->connection; > wa_virtualhost *host=NULL; // added > wa_application *appl=NULL; > wa_chain *elem=NULL; // added > wa_request *req=NULL; > const char *msg=NULL; > char *stmp=NULL; > char *ctmp=NULL; > char *ssl_temp; > int ret=0; > > /* Paranoid check */ > if (!wam_initialized) return(DECLINED); > > // begin added... > > /* Check if this host was recognized */ > host=ap_get_module_config(r->server->module_config,&webapp_module); > if (host==NULL) return(DECLINED); > > /* Check if the uri is contained in one of our applications > root path */ > elem=host->apps; > while(elem!=NULL) { > appl=(wa_application *)elem->curr; > if (strncmp(appl->rpth,r->uri,strlen(appl->rpth))==0) break; > > appl=NULL; > elem=elem->next; > } > if (appl==NULL) return(DECLINED); > > /* Set the webapp request structure into Apache's request > structure */ > ap_set_module_config(r->request_config, &webapp_module, appl); > > // ...end added > > Regards, > Dan Lindy > > At 04:02 PM 3/15/02 +0000, you wrote: > >Hi Paul, > > > >I sent a message to the dev list about this (no response, I even offered to > >do the > >coding). I've tried mod_rewrite to probably do exactly what you've been > >doing (no luck). > > I don't think it is off topic, because search engines will leave > >immediately when they > >see the 302 response which will dramatically affect your site's traffic. > > > >Regards, > > > >James Williamson > > > >www.nameonthe.net > > > > > >----- Original Message ----- > >From: Edam Cheeseman <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Friday, March 15, 2002 2:57 PM > >Subject: OFFTOPIC: apache mod_rewrite > > > > > > > Hi list, > > > > > > Just wondering if anyone has tried using apache mod_rewrite to rewrite > >their > > > URLs allow search engines to crawl their dynamic tomcat-served pages? > > > > > > If so, have you noticed any favourable impact on your rankings? Just > >curious > > > to see if its worth doing before I invest what looks like a lot of time > > > figuring out how to do it. > > > > > > thanks, > > > > > > Paul > > > > > > _________________________________________________________________ > > > Get your FREE download of MSN Explorer at > >http://explorer.msn.com/intl.asp. > > > > > > > > > -- > > > To unsubscribe: <mailto:[EMAIL PROTECTED]> > > > For additional commands: <mailto:[EMAIL PROTECTED]> > > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > > > > > > > >-- > >To unsubscribe: <mailto:[EMAIL PROTECTED]> > >For additional commands: <mailto:[EMAIL PROTECTED]> > >Troubles with the list: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>