Joshua Slive wrote: > On 5/21/07, Dmitriy Gorbenko <bazil@xxxxxxxxxxxx> wrote: > >> And now, I did not understand how, by using only one >> RewriteRule ^(.+)$ ${rd:%{THE_REQUEST}} >> rule and one programs, I can achieve such goal. > > I can't personally tell what question you are asking here. What > exactly are you having problems with? Do you want help writing the > external map program? > > As general advice, I'd avoid the external map program if possible. > They tend to be complicated, fragile, and error-prone. Plus they are > serialized, so they could become a bottleneck for your site. > > I bet you could accomplish the same thing use a dbm RewriteMap. > > Joshua. > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server > Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > Well, I'll try to explain: let's look at fictitious session between server and client: C: GET http://ofiice.domain.com/document.html S: 302 - http://login.domain.com/ (redirect method) C: GET http://login.domain.com/?username=aaa&passwd=bbb S: 302 - http://office.domain.com/afjgn39nxnx8n3f29ss/document.html (redirect method) C: GET http://office.domain.com/afjgn39nxnx8n3f29ss/document.html S: gives resource content (proxy method) Clients tries to acces some document, but server want client to be authenticated before. Server create some session-id (afjgn39nxnx8n3f29ss), and client should use this session-id to access resource office.domain.com. And later, than client send this session-id. server will proxy such request to local network server, which is not public, and which contains 'document.html' resource. Or another example, where client, 1 hour later, tries to access the same document: C: GET http://office.domain.com/afjgn39nxnx8n3f29ss/document.html S: 302 - http://login.domain.com/ (redirect method) C: GET http://login.domain.com/?username=aaa&passwd=bbb S: 302 - http://office.domain.com/jh43hkjshdfsdyhskdvc/document.html (redirect method) C: GET http://office.domain.com/jh43hkjshdfsdyhskdvc/document.html S: gives resource content (proxy method) I think I could do it using mod_rewrite, but now I understand, that I can't: in apache config file I can create rules, which will makes an decision: redirect or proxy request of client (R and P flags). But by using external program I can't make such decision. And that is a problem.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature