Re: mod_rewrite and WO to rewrite /index.html into
Chad Leigh <[email protected]> Fri, 2 Dec 2005 12:15:43 -0700
| Newsgroups | gmane.comp.web.webobjects.admin |
|---|---|
| Message-ID | <[email protected]> |
On Dec 2, 2005, at 12:09 PM, Jon Nolan wrote: > Chad, > > If you're using VirtualHosts within your apache.conf you'll need to > turn the engine on and add the rules within them. > > Example: > > ## > ## xyz.com ## > ## > <VirtualHost 1.2.3.4:80> > ServerName xyz.com > DocumentRoot ..................../xyz.com > ServerAlias www.xyz.com > <Directory /Library/WebServer/Websites/xyz.com> > Options All +MultiViews -ExecCGI -Indexes > AllowOverride All > </Directory> > RewriteEngine On > RewriteRule ^index\.html$ cgi-bin/WebObjects/app.woa > [last,passthrough] > </VirtualHost> > > > I have no idea why but it works when it's there and does not when > it's elsewhere. Others on this list have confirmed this behavior. except for the last, that is exactly what I have. It is in the VirtualHost section that I want to do this with. I will try again and try last. Thanks Chad > > Jon > > At 12:01 PM -0700 12/2/05, Chad Leigh wrote: >> I would like a simple apache rewrite of /index.html into the start >> of my wo-app. I do not want a redirect but want /index.html to >> actually return the main page of my app without a redirect. Right >> now I am just interested in the main page. Maybe later I will >> play with other things. >> >> Anyway, I have googled WO and mod_rewrite and it says, if I >> understood things correctly, in the various posts, to place >> mod_rewrite after the AddModule / LoadModule for mod_webobjects. >> I have done that (have actually tried both). >> >> My rule is a simple one >> >> RewriteEngine on >> RewriteLog logs/mysite.com-rewrite_log >> RewriteRule ^index\.html$ cgi-bin/WebObjects/app.woa >> >> I have also tried it with [PT] for pass-through at the end of the >> rule >> >> Nothing happens and I do not get anything in the rewrite log, >> which was created but stays 0 length. >> >> Has anyone used rewriting in this way? >> >> Thanks >> Chad >> >> _______________________________________________ >> WebObjects-admin mailing list >> [email protected] >> http://www.omnigroup.com/mailman/listinfo/webobjects-admin >