On Monday, 19 October 2020 10:33:50 UTC+1, Annet wrote: > > Hi Jose, > > Thanks for your reply. > > One more thing. I've got routes.py in web2py's root folder, as you can see > I've got > three applications, do I place the robots.txt file in all three > application's static > folder? > > Yes you'd have one robots.txt for each application, and they can be different. So for example, assuming your init app at domain.com is public and allows access to everything you'd have a robots.txt with something like:
User-agent: * Disallow: Then assuming that in your admin and controlpanel apps you want no indexing you might have a robots.txt in each app folder with something like: User-agent: * Disallow: / In other words, when web2py receives a request for http://(www.)domain.com/robots.txt it will serve the robots.txt file in the init application's static dir. If the request is for http://ldc.domain.com/robots.txt then it serves the robots.txt file that is in the admin app's static directory, and so on. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/160c8d2e-d6e6-476d-b0d3-83f90e456e8eo%40googlegroups.com.

