[Zope] Intercepting and processing URLs

Dieter Maurer dieter@handshake.de
Fri, 25 Oct 2002 20:56:46 +0200


AM writes:
 > What I want to do is that if a page has a link called :
 > 
 > http://myserver:8080/images/test.jpg
 > 
 > I would like to translate that to
 > 
 > http://user:password@myserver:8080/images/test.jpg
 > 
 > However I dont want this URL appearing on the user's client, so can I 
 > use Apache rewrite rules for that.?
When Apache knows with user and password it should add, a Rewrite
rule can do that easily.
But, I doubt, that this will have the effect, you expect.

   "user:password" is usually interpreted by the HTTP client
   and converted into an "Authorization" header.

   While Apache functions as an HTTP client when you
   use a proxying rewrite rule ([P]), it may not handle
   this rare case correctly.

 > If not what option do I have??
Why do you want to do that?

  When each URL is automatically converted into
  a correct "user:password@..." URL, you can use
  the original URL directly (without transformation).

  When it is the users "user:password", then you simply protect
  your target object and let Zope's security handle this case.



Dieter