Dear All,
Ok here I am -- over a full day later -- with a stupidly-simple
work-around hack:
routes_in...
('/app1/prettyurl(?P<any>.*)', r'/app1/plugin_wiki\g<any>'),
('/app2/prettyurl(?P<any>.*)', r'/app2/plugin_wiki\g<any>'),
routes_out...
('/app1/plugin_wiki(?P<any>.*)', r'/app1/prettyurl\g<any>'),
('/app2/plugin_wiki(?P<any>.*)', r'/app2/prettyurl\g<any>'),
However, on accessing http://domain2/ I would always be redirected to
http://domain1/
So I added this line to the beginning of app1/models/0.py
if 'domain2' in request.env.http_host:
redirect('http://domain2/app2/prettyurl/page/home') # my home page
in plugin_wiki
I won't even mention about the hyphens in my plugin_wiki slugs. I had to
change them to underscores and then hack the plugin_wiki code to accept
them. What a huge amount of time for such small progress!
Lessons to be learnt:
1. Why have 3 different routing systems? One obvious way of doing
things? ha!
2. Regex is almost always beyond someone like me -- unless I have
recipes to follow. All the obvious routing ideas should be spelt out in
one list. There aren't that many mainstream ideas for routing. For
example, what is anyone supposed to make of this?
(r'.*http://otherdomain.com.* /app/ctr(?P<any>.*)', r'\g<any>')
I may possibly be the only person in the group to have found it
incomprehensible, which is indeed a pity because it looks as if it might
have been exactly what I wanted. Sadly, I still don't understand it after
a full day. This list is full of routing questions, none of which seemed
to quite spell it out.
Sorry for ranting a bit, and thanks for listening. The only route I need
now is the route to the nearest bar!
Best regards, David
--