Thanks Jonathan, I ended just pointing the default function to a main() and 
from there I redirected to my index() in my controller.


On Thursday, October 10, 2013 5:47:22 PM UTC-4, Jonathan Lundell wrote:
>
> On 9 Oct 2013, at 9:11 PM, Apple Mason <apl...@gmail.com <javascript:>> 
> wrote:
>
> I'm trying to shorten the url from something like:
>
> www.example.com/myapp/default/index?page=1
>
> to 
>
> www.example/com/index?page=1
>
> I'm using pagination on the index page, so that's why you see the ?page=1
>
> My routes.py is pretty standard:
>
> routers = dict(
>     # base router
>     BASE=dict(
>         default_application='myapp',
>     ),
>     myapp = dict(
>         default_controller='default',
>         default_function='index',
>         functions=['index', 'dostuff', 'download'],
>     ),
> )
>
>
> Everything seems fine, except the index page is this:
>
> www.example.com/?page=1
>
> I'm missing the word 'index' in the url.
>
>
> The function listed as default will also be removed from URLs as they get 
> shortened. If you don't want that, specify something else. I don't recall 
> offhand the best way to do it, but you might try setting the default 
> function to None, or else to some non-existent function name.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to