[Zope] PATH_INFO und regex
chas
panda@skinnyhippo.com
Sat, 02 Oct 1999 10:34:31 +0800
>> <dtml-call "REQUEST.set(s, s[:_.string.rfind(s, '/')])">
><dtml-call "REQUEST.set('s', s[:_.string.rfind(s, '/')])">
> ^ ^
>> </dtml-if>
>
>> where s is your path_info (which you sub straight into the above)
>
>Yes. Thank you. Works great.
>
>> not sure what you need this for but you might want to check URL1 also.
>
>URL1 includes the domain, so for every "click" there will be a
>DNS-request (the common Browsers don't cache DNS, IIRC).
Sorry, this is news to me. Doesn't URL1 just include the SERVER_URL
(ie. whatever was put in the query string url ?)
I develop off line so DNS lookups are not possible and yet I use URL1
all the time. It seems far fetched that we'd have to do a DNS lookup
for each request.
Wait, couldn't you just do this :
URL1[_.len(SERVER_URL)
That would give you the PATH_INFO minus any trailing dtml methods or
documents.
chas