roxen.lists.roxen.general

Subject Author Date
Re: access URL pejo0041 <pejo0041[at]yahoo[dot]com> 02-08-2008
Not exactly sure if I get the quesion right, but if you want to extract the
hostname from the request in rxml the domain part is in the roxen scope,
variable name 'domain' -> &roxen.domain;

As a little tip you could use the following snippet to get all variables and
values in a scope (here the page scope) in rxml:

<emit source="values" from-scope="page">
  &_.index; = &_.value;<br/>
</emit>

Or look in the docs: Web developer manual > Variables, Scope and Entities
for a list of variables.

/Peter





----- Original Message ----
From: Martin Bähr <<mbaehr[at]email.archlab.tuwien.ac.at>>
To: "Marc Dirix @ Electronics Design" <<marc[at]electronics-design.nl>>
Cc: <roxen[at]roxen.com>
Sent: Saturday, August 2, 2008 11:00:18 AM
Subject: Re: access URL

On Sat, Aug 02, 2008 at 10:46:26AM +0200, Marc Dirix @ Electronics Design wrote:
> What scope/entity would I need to access if I wanted to extrakt
> the requested URL.
> 
> i.e.: http://www.example.com/foo/bar => www.example.com

you mean you want to extract the hostname from the url?
look at the available scopes. one scope should have some info about the
request. not sure if the hostname is part of that. if not you need to
write something in pike.

greetings, martin.
-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   working in china                      community.gotpike.org
unix system-      iaeste.(tuwien.ac|or).at                    open-steam.org
administrator    caudium.org                                    is.schon.org
Martin Bähr      http://www.iaeste.or.at/~mbaehr/