Check out the bottom part of this section 
<http://web2py.com/books/default/chapter/29/04/the-core#Pattern-based-system>. 
The URL protocol is part of the pattern to be matched, so presumably you 
can match "http" and rewrite to "https".

Anthony

On Saturday, December 6, 2014 10:44:32 PM UTC-5, viniciusban wrote:
>
> Is there a way to redirect http to https using routes.py? 
>
> I'm running web2py with the following command: 
> $ python web2py.py --nogui -a adminpassword -c ~/openssl/server.crt -k 
> ~/openssl/server.key -i 0.0.0.0 -p 8000 
>
> This way, web2py doesn't accept http connections. It returns a "Bad 
> Request" error. So, I'd like to make a redirect in routes.py but I 
> couldn't realize how to make it work. 
>
> Any ideia? 
>

-- 
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/d/optout.

Reply via email to