Adapting virtualhostfilter for a subdirectory structure.

2 views
Skip to first unread message

leo

unread,
Oct 12, 2005, 6:05:25 PM10/12/05
to cherrypy-users
Hi, I'd like some information on adapting virtualhostfilter for a user
setup.

What I'd like is when a request comes in for
http://example.com/~leo/chpy/guestbook
cherrypy should ignore the ['~leo', 'chpy'] and only act on
'guestbook'?

I added the following to my config:
virtualHostFilter.on = True
virtualHostFilter.prefix = "/~leo/chpy"

However, every request goes to my default callable in controller. I'm
using the extended call syntax in default(), and I'm not seeing any
*args passed through either.

Is there something I'm missing? I took a look at the "virtualhostfilter
examples" from Tim Williams (
http://groups.google.com/group/cherrypy-users/browse_thread/thread/f393540fe278e54d
) and tried to adapt from that as much as possible.

Thanks in advance,
leo

John Speno

unread,
Oct 12, 2005, 6:27:30 PM10/12/05
to cherryp...@googlegroups.com

On Oct 12, 2005, at 6:05 PM, leo wrote:

>
> Hi, I'd like some information on adapting virtualhostfilter for a user
> setup.
>
> What I'd like is when a request comes in for
> http://example.com/~leo/chpy/guestbook
> cherrypy should ignore the ['~leo', 'chpy'] and only act on
> 'guestbook'?

You may need the VirtualPathFilter found here:

http://www.cherrypy.org/wiki/VirtualPathFilter

leo

unread,
Oct 13, 2005, 12:58:33 PM10/13/05
to cherrypy-users
You are exactly correct. Thanks so much.

Reply all
Reply to author
Forward
0 new messages