URIs

45 views
Skip to first unread message

Anupam

unread,
May 21, 2012, 1:01:26 PM5/21/12
to fa...@googlegroups.com
Hi Again,

Have a question regarding URIs.

I have configured the following in the base script:

evwsgi.wsgi_cb(("/page1", page1))
evwsgi.wsgi_cb(("/page2", page2))
evwsgi.wsgi_cb(("/page3", page3))
evwsgi.wsgi_cb(("/page4", page4))
evwsgi.wsgi_cb(("/", mainpage))

The above work fine, however URIs to non-existent links/pages also go through. For example, http://mysite.com/page1/randomstring  also leads to http://mysite.com/page1
But this is not what i am trying to reach to. I want to block all requests to URIs to non-configured sub pages/links (atleast they should show up as 'page not found').

How can i achieve it?

Thanks Again for all the help,
-Anupam



william opensource4you

unread,
May 22, 2012, 2:51:33 PM5/22/12
to fa...@googlegroups.com
Hello Anupam,


Fapws takes the 1st match

Thus /page1/random match the URI /page1
This is the normal behavior (http://www.fapws.org/getting-started).

More over with your setup you'll always match "/", when /pageX are not
requested.


In your specific case, you could build a displayerror method, that you
will trigger when PATH_INFO is not null.


W
Reply all
Reply to author
Forward
0 new messages