[Zope] Has anyone tried to make Zope invisible using IIS

Jay, Dylan djay@lucent.com
Thu, 29 Apr 1999 09:10:06 +1000


> -----Original Message-----
> From: Brian Lloyd [mailto:Brian@digicool.com]
> Sent: Wednesday, 28 April 1999 23:29
> To: 'Jay, Dylan'
> Cc: 'zope@zope.org'
> Subject: RE: [Zope] Has anyone tried to make Zope invisible using IIS
> 
> 
> > > As much as I hate to suggest it, you may be forced to hack the
> > > code in lib/python/ZPublisher/HTTPRequest.py that determines
> > > what the BASE variable should be... or switch to using a more
> > 
> > What are the implications of doing this? Can I just hard code 
> > in my vitual
> > address and everything should work fine?
> 
> If it were _me_, I'd do the following, to avoid having to 
> hack the distributed Zope code (which will be a pain when
> you later want to upgrade to a new version):
> 
> 1) In your _top_ level Folder, define a property called
>    base_url, with a value that reflects your alias to 
>    the top level zope folder.
> 
> 2) In places where you need hyperlinks, instead of using
>    BASE0, use a construct like:
> 
>    <a href="<!--#var base_url-->/foo/bar/etc">a link</a>
> 
> This way, you dont have to hack the code, the links should
> look right and if your base_url changes, you only need to
> change one property to fix the entire site. The drawback, 
> of course, is that you won't be able to use relative urls
> in your hrefs (because the browser would prepend the contents
> of the base tag), but this is usually not a big problem in
> practice.

Sounds like a reasonable solution, but out of interest, how does zope
determine its base address anyway? Is it based on one of the environment
variables passed in to the zope cgi? If so, is the problem that when using a
isapi filter on iis, this variable does not reflect the change? If so, if I
could fix that variable I suppose that would be a more general solution and
I could use both relative address and the URLn variables.

In any case, shouldn't there be a more flexible way of telling zope what its
address really is?