#!/usr/bin/python
# -*- coding: utf-8 -*-

routers = dict(
  BASE  = dict(
      domains = {
          'mydomain.de' : 'App1',
          'www.mydomain.de' : 'App1',
          'ip' : 'App2',
          'ip/Test' : 'TestEnv',
          'ip/MA' : 'dbmigratetest',
      }
  ),
)
logging = 'debug'
def __routes_doctest():
...
I just noticed I never set the default controler. I only did that in my old
routes.example based file. but it still has the effect: the controler is
removed from the URL

On Thu, Mar 14, 2013 at 8:23 PM, Jonathan Lundell <[email protected]>wrote:

> On 14 Mar 2013, at 12:20 PM, BlueShadow <[email protected]> wrote:
>
> Jonathan Lundell my default controler is default.py which has the
> funktion viewArticle by using the router I said that default.py is the
> default controler so this is no longer in the URL.
>
>
> Then you should be nearly there. What does your current routes.py look
> like?
>
>
> On Thursday, March 14, 2013 6:58:01 PM UTC+1, Jonathan Lundell wrote:
>>
>> On 14 Mar 2013, at 10:45 AM, BlueShadow <[email protected]> wrote:
>>
>> I was wondering if it is possible to change the dynamic URLs to static
>> ones. eg 
>> www.mydomain.com/Controler/**Function?id=34<http://www.mydomain.com/Controler/Function?id=34>
>>  towww.mydomain.**com/titleofpage <http://www.mydomain.com/titleofpage>
>> So far I removed the controler by setting it in the routes.py as default
>> controler.
>> I know that you could do it manually by using the .htaccess file with mod
>> rewrite.
>> In my sample domain lets say the functions name would be viewArticle and
>> the parameter id=xx the id number of the article. lets say the title of the
>> article is "web2py - An awesome framework"
>> I would love to have this URL www.mydomain.com/**
>> viewArticle_web2py_An_awesome_**framework<http://www.mydomain.com/viewArticle_web2py_An_awesome_framework>
>> any ideas other than mine to write to the htaccess file every time a new
>> article is written? Well I know one could do it by python code.
>>
>>
>>
>> The parametric router will give you a URL like:
>>
>> www.mydomain.com/viewArticle/**web2py_An_awesome_framework<http://www.mydomain.com/viewArticle/web2py_An_awesome_framework>
>>
>> ...and if you list the functions in viewArticle and make it the default
>> controller, you can use:
>>
>> www.mydomain.com/web2py_An_**awesome_framework<http://www.mydomain.com/web2py_An_awesome_framework>
>>
>> Of course, viewArticle needs to know how to look up an article by its
>> slug (which it will find in request.args(0))
>>
>>
>> FWIW, if you only (or mostly) view articles, I'd choose a name more like:
>>
>> www.mydomain.com/view/web2py_**An_awesome_framework<http://www.mydomain.com/view/web2py_An_awesome_framework>
>>
>>
>
>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/OqRd6PgWbJI/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
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/groups/opt_out.


Reply via email to