Originally this was a question, but considering is something I need for my
business, I added "JOB POST" to the title.
If you consider that you know how to achieve what I need, I'm willing to
pay for the work.
Sorry if this is not the place to ask for a web2py developer (in that case,
the post is still a question to the group).
To help you understand, first let me tell *what I have right now*:
- I have one web2py instance running.
- I developed two web2py apps that, together, they allow you to have
your website (like a blog) and manage it yourself:
- the first app is the public website, and right now it is accessible
through the top level domain: mywebsite.com
- one of the apps is the control panel, where you can post/edit new
articles, etc, and it is accessible through a subdomain:
panel.mywebsite.com
- I have several websites running, each one with its top level domain.
I got all this working using *parameter-based* routing:
routers = dict(
BASE=dict(
default_controller='default',
default_function='index',
domains={
# one website
'recipes.com': 'recipes',
'panel.recipes.com': 'recipes_panel',
# another website
'traveler.com': 'traveler',
'panel.traveler.com': 'traveler_panel',
# ... several more websites ...
},
root_static=['robots.txt'],
map_static=True,
exclusive_domain=True,
)
)
*Note that with exclusive_domain=True, each app is accessible only through
one specific domain, and it's not possible to access it from another
domain.*
However, consider this: what if I want to setup SSL for a website?
I would have to buy a wildcard SSL certificate, because I have the website
divided in two parts, one of them (the control panel) in a subdomain.
Wildcard SSL certificates are usually more expensive, and I don't want to
force that.
Considering all that, here is *what I want to achieve*:
- Each website still would be formed by two web2py apps, so in our
example, we would still have these four web2py apps:
- applications/recipes
- applications/recipes_panel
- applications/traveler
- applications/traveler_panel
- The public portion of a website would still have to be served in
the top level domain, and the default controller and default function would
be 'default' and 'index' respectively, so:
- recipes.com/ ---------------> /recipes/default/index
- recipes.com/contact ----> /recipes/default/contact
- recipes.com/load/init ----> /recipes/load/init
- *(same stuff for every other domain)*
- The control panel (and this is how it gets tricky) would have to be
served through /panel (notice that the app name is different), so:
- recipes.com/panel ------------------->
/recipes_panel/default/index
- recipes.com/panel/contenido ------>
/recipes_panel/default/contenido
- recipes.com/panel/ads/new --------> /recipes_panel/ads/new
- traveler.com/panel ------------------->
/traveler_panel/default/index
- traveler.com/panel/contenido ------>
/traveler_panel/default/contenido
- traveler.com/panel/ads/new --------> /traveler_panel/ads/new
- Each domain would allow to access only the couple of apps regarding
that website, that is:
- "recipes" and "recipes_panel" apps would only be accessible trough
recipes.com domain
- "traveler" and "traveler_panel" apps would only be accessible
trough traveler.com domain
I think I need to use *pattern-based *routing system, but I've never used
python's regular expressions at all. I'm reading about it and doing some
tests, but I'm having a hard time to figure out how should I do it.
Remember that I'm willing to pay for the job if you consider that you know
how to do it.
Thanks in advance!
Best regards,
Lisandro.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.