On Sunday 09 December 2001 11:05, Tim Payne wrote:
> On Sunday, December 9, 2001, at 11:04  AM, Chuck Esterbrook wrote:
> > In the mean time (if you're up to tracking it down), can
> > mod_rewrite get you what you need with minimal effort?
>
> Using this I was able to get 127.0.0.1 to forward to
> 127.0.0.1/wk/MySite
>
> RewriteEngine on
> RewriteRule   ^/$  /wk/MySite/  [R]
>
> That works for now, but I would really like to have the forwarded
> url still use 127.0.0.1 as the base url, just accessing the files
> from /wk/MySite. I looked though the mod_rewrite docs, but I
> couldn't find a way to do this.

  RewriteRule ^/.*$ /wk/MySite/ [R]

or something like that should do it, BUT you can't do any non webkit 
stuff from Apache with this configuration.

A better approach would be to map each sub directory in your Servlet 
dir with multiple RewriteRules:

  RewriteRule ^/Products/.*$ /wk/MySite/Products/ [R] 
  RewriteRule ^/Services/.*$ /wk/MySite/Services/ [R] 
  etc.

Using mod_rewrite is the only way to make this work with WebKit 0.6.  
It expects the name of the servlet files to be stored in the 
PATH_INFO cgi field, rather than in SCRIPT_NAME:

  http://yourhost.com/MyServlet.py 
is rewritten to:
  http://yourhost.com/wk/MySite/MyServlet.py 
which WebKit sees as 
  SCRIPT_NAME = "/wk/MySite"
  PATH_INFO = "/MyServlet.py"

I've been writing some experimental code that allows WebKit to use 
SCRIPT_NAME instead, but that code is a while off from 
completion/acceptance.  If WebKit 0.7 supports this, you'd just use   

  AddHandler mod_webkit *.py
  AddHandler mod_webkit *.psp

However, there are numerous advantages to sticking with PATH_INFO 
that I won't go into now.
  
Hope that helps,
Tavis

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to