I delete all lines but the the routers dict in the routes.py and the I 
always restart the IIS completly.

The endless loop is the redirect on error (which I don't understand)  to 
the welcome app which is not available. The 400 error appears when I have a 
default_application in the base router and it is somehow not found.

On Thursday, May 30, 2013 7:19:31 PM UTC+2, Jonathan Lundell wrote:
>
> On 30 May 2013, at 9:40 AM, Marian <scor...@gmx.net <javascript:>> wrote:
>
> Sorry if it's a repost:
>
> I don't use routes_onerror or at least not when testing the 
> parameter-based routing.
>
> I tried to explicitly write the imagecontest app in the router but the I 
> get a 500.0 server error:
> routers = dict(
>   BASE  = dict(
>       path_prefix='applications',
>       default_application = 'imagecontest',
>       ),
>   imagecontest = dict(),
> )
>
>
> There's no need for an imagecontest dict if it's empty. It's possible that 
> an empty router dict is causing the 500; I'm not sure it's been tested. 
>
> The thing about routes_onerror is that the redirects are conditioned on it 
> being present (the default is empty). So I'm thinking that the 303 messages 
> below must be coming from a routes.py with routes_onerror defined (so maybe 
> not a parametric router).
>
> Note that you need to restart web2py after changing routes.py. The 
> reload-routes function in admin isn't useful if there are multiple server 
> processes.
>
>
>
> On Thursday, May 30, 2013 6:13:42 PM UTC+2, Jonathan Lundell wrote:
>>
>> On 30 May 2013, at 8:46 AM, Marian <scor...@gmx.net> wrote:
>>
>> In rewrite.py I see two 303 responses in try_rewrite_on_error and 
>> try_redirect_on_error, I think one is responsible for the automatic 
>> redirect.
>>
>>
>> I didn't notice that you had routes_onerror defined. What's its value?
>>
>>
>>
>>
>>
>> On Thursday, May 30, 2013 5:31:54 PM UTC+2, Jonathan Lundell wrote:
>>>
>>> On 30 May 2013, at 8:24 AM, Marian <scor...@gmx.net> wrote:
>>>
>>> When I use the prefix w2p and try to open /applications I get:
>>>
>>> GET /applications /303 SEE OTHER
>>> GET welcome 404 Not Found
>>>
>>> The endless loop are 303 SEE OTHERs
>>>
>>> Response: You are being redirected <a 
>>> href="/applications/welcome">here</a>
>>>
>>>
>>> Any idea who's generating the redirects? The router does not.
>>>
>>>
>>>
>>>
>>> On Thursday, May 30, 2013 3:54:51 PM UTC+2, Jonathan Lundell wrote:
>>>>
>>>> On 30 May 2013, at 6:36 AM, Marian <scor...@gmx.net> wrote:
>>>>
>>>> When I change the prefix to e.g. 'w2p' it directs me to /w2p/welcome an 
>>>> there is no endless loop.
>>>>
>>>>
>>>> What are the details of the invalid-response message?
>>>>
>>>>
>>>> On Thursday, May 30, 2013 3:12:21 PM UTC+2, Massimo Di Pierro wrote:
>>>>>
>>>>> Do you get the endless loop if the prefix is different from 
>>>>> "applications"?
>>>>>
>>>>> On Thursday, 30 May 2013 02:12:01 UTC-5, Marian wrote:
>>>>>>
>>>>>> Nobody had issues like this before? :(
>>>>>>
>>>>>> On Thursday, May 23, 2013 10:06:06 AM UTC+2, Marian wrote:
>>>>>>>
>>>>>>> I wanted to switch from pattern-based routing on a Windows IIS7 
>>>>>>> Server with isapi_wsgi to a parameter-based routing to benefit from 
>>>>>>> nicer 
>>>>>>> urls but it is not working.
>>>>>>> It either says invalid request or the server stucks in an endless 
>>>>>>> loop.
>>>>>>>
>>>>>>> My functioning pattern based routing. As you can see I need to 
>>>>>>> remove the prefix 'applications'.
>>>>>>> default_application = 'imagecontest'
>>>>>>> default_controller = 'default'
>>>>>>> default_function = 'index'
>>>>>>>  
>>>>>>> routes_in=(('/applications/(?P<any>.*)','/\g<any>'),)
>>>>>>> routes_out=(('/(?P<any>.*)','/applications/\g<any>'),)
>>>>>>>
>>>>>>>
>>>>>>> What I tried...
>>>>>>> Invalid request (even without the path_prefix):
>>>>>>> routers = dict(
>>>>>>>     BASE=dict(
>>>>>>>         default_application = 'imagecontest',
>>>>>>>         path_prefix = 'applications',
>>>>>>>     )
>>>>>>> )
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Endless loop:
>>>>>>> routers = dict(
>>>>>>>     BASE=dict(
>>>>>>>         path_prefix = 'applications',
>>>>>>>     )
>>>>>>> )
>>>>>>>
>>>>>>> Am I doing something wrong?
>>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>>
>>> -- 
>>>  
>>>
>>>
>>>
>>>
>>>
>> -- 
>>  
>>
>>
>>
>>
>>
> -- 
>  
>
>
>
>
>

-- 

--- 
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