On Friday, October 13, 2017 at 2:12:13 AM UTC-7, Joe wrote: > > Thanks very much Anthony for all your help with this one. I copied the > exact code you posted but nothing changed. >
Did you restart web2py? The routes file isn't normally reloaded while the server is running. > > I wonder if this has to do with having multiple apps in the web2py > directory. I just can't fix this issue no matter what I do. > > Btw, even if I was to manage somehow to get rid off the "init", is it > possible to have this URL *mysite.com/robot.txt > <http://mysite.com/robot.txt>* - probably not possible, right? Even on > the link you sent, it would be *mysite.com/default/robot.txt > <http://mysite.com/default/robot.txt> *- which means the search engines > wouldn't find it. > > Put robots.txt in your static folder. /dps > But, I can't even get rid of the "init", which is frustrating. I asked > about this on pythonanywhere, but they don't know. They say it's a web2py > issue. > > On Monday, September 18, 2017 at 10:25:54 PM UTC+8, Anthony wrote: >> >> FYI, here is a Pythonanywhere app with routing working as expected (the >> app is named "init"): https://w2ptest.pythonanywhere.com/ >> <https://www.google.com/url?q=https%3A%2F%2Fw2ptest.pythonanywhere.com%2F&sa=D&sntz=1&usg=AFQjCNEGRowkNGI04V6puqZsomxXem1MRQ> >> >> Below are the exact contents of the /web2py/routes.py file for the above >> installation: >> >> routers = dict( >> BASE = dict( >> default_application='init' >> ), >> init = dict( >> default_controller='default', >> default_function='index', >> functions=['call', 'download', 'index', 'user'] >> ) >> ) >> >> Also, note that as long as you are going to use the rewrite system as >> above, there is no particular reason to name your app "init". The only >> reason to use "init" is if you are not using the rewrite system and want a >> default application when accessing a URL with the domain name only. >> >> Anthony >> >> On Monday, September 18, 2017 at 10:05:31 AM UTC-4, Anthony wrote: >>> >>> On Monday, September 18, 2017 at 9:30:26 AM UTC-4, Joe wrote: >>>> >>>> Thanks Anthony, when you say "*specify the functions in the default >>>> controller* ", what do you mean exactly? I just want to make sure I >>>> understand you correctly. >>>> >>> >>> See https://groups.google.com/d/msg/web2py/FcdWR6VuB6Y/Et3sUGmHBAAJ. >>> >>> But that does not appear to be the issue you are experiencing. You might >>> have to contact Pythonanywhere support, as it sounds like somehow it is >>> ignoring the routes.py file. >>> >>> Anthony >>> >> -- 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.