Hmm....
does not work correctly in the distributed pages (welcome, admin,..).
After a bit of looking around I found code like:
default/site.html:
=== snip ===
<h1>Installed applications</h1>
...
{{for a in apps:}} {{if a==request.application:}}
<h2><a href="">{{=a}}</a></h2> [
{{else:}}
<h2><a href="/{{=a}}/default/index">{{=a}}</a></h2> [
<a href="{{=URL(r=request,f='uninstall',args=a)}}">uninstall</a> |
=== snip ===
or controllers/default.py:
=== snip ===
## generate menu
_f = request.function
response.title='%s %s' % (_f, '/'.join(request.args))
response.menu = [(T('site'), _f == 'site', '/%s/default/site' %
request.application)]
if request.args:
_t = (request.application, request.args[0])
response.menu.append((T('about'), _f == 'about', '/%s/default/
about/%s' % _t))
response.menu.append((T('design'), _f == 'design', '/%s/default/
design/%s' % _t))
response.menu.append((T('errors'), _f == 'errors', '/%s/default/
errors/%s' % _t))
=== snip ===
This is the reason for the broken links in this setup - URLs are
sometimes constructed
with "wire and duct tape" instead of the URL() function.
Any chance that somebody cleans the code so that settings in
"routes.py" are used
(by using URL() systematically) ?
Bernd
mdipierro schrieb:
> in routes you can do
>
> routes_in=(('/prefix/(?P<a>.*)','/$a'),)
> routes_out=(('/(?P<a>.*)','/prefix/$a'),)
>
> then you visit
>
> http://host/prefix/welcome/default/index
>
> instead of
>
> http://host/welcome/default/index
>
>
> thous should be all you need
>
> Massimo
>
>
> On Apr 27, 10:06 am, Bernd das Brot <[email protected]> wrote:
> > Hi,
> > I (still) need to implement web2py with a prefixed URL without using
> > apache mod_proxy_html.
> > Am I really the only one who needs this ? Obviously not - see the
> > AlterEgo Article
> >
> > http://www.web2py.com/AlterEgo/default/show/136
> >
> > I believe that web2py should work _without_ the mod_proxy_html part
> > ("ProxyHTMLURLMap"..),
> > if the configuration in "routes.py" is "just right".
> >
> > Has anybody done this ?
> >
> > Bernd
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---