On Wednesday, December 6, 2017 at 10:19:12 AM UTC-5, Manuele wrote: > > Hi Anthony, > > thank you for your reply, > > On 06/12/2017 15:36, Anthony wrote: > > I followed what indicated in the web configuration panel setting up two >> static configuration considering that my application is accessible both >> as init and as <appname>. >> > > First, what do you mean by this -- do you have two exact copies of the > same application, one in /applications/init and one in > /applications/appname? If so, why? > > > I simply create a local symlink in the application folder called init that > point to the parallel application folder in order to let the web server > respond to the requests with no specified application with the one I want. >
A better approach is to use the parameter-based rewrite system to make your app the default application (that way, you will never see /init in the URL). > web2py will not generate any URLs matching /init/<appname> to point to > static files (or for any requests). What is the point of that mapping? > > > as far as I can see in the headers of my web application pages static > files are linked accordingly to the requested path, so: > > if http://myhost/app/default is requested static file links looks like: > http://myhost/app/static/... > on the other hand if http://myhost/init/default is requested static file > links looks like: http://myhost/init/static/... > > isn't it correct?? > Yes, correct. My comment was in reference to your /init/<appname> URL, which apparently was just a mistake. > > > >> >> than (after reloaded the application) I tried to access the same static >> file from the browser using the two options: >> >> 1. http://<myhostname>/init/static/<pathTo>/<someFile>.js >> 2. http://<myhostname>/<appname>/static/<pathTo>/<someFile>.js >> > > Mapping #2 above is for /init/<appname>, so it will not affect requests to > /<appname>/static. If you want to re-route requests for /<appname>/static, > then you need a mapping for that pattern. > > > you're right... I wrote an errata corrige for that above. Sorry. > > > What exactly are you trying to achieve? Why are you trying to map some > static requests to a non-existent folder? > > > I just wanted to check the effect of my configuration. > Maybe the browser has cached the files -- try a force refresh. Otherwise, check with Pythonanywhere support. 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.