so far,i am building AngularJS application served with nginx. I had rails in the middle and i came with rewrite ^/(?!assets) / last;
rewrite rule (rewrite everything expect those beginning with assets), so far it was working - with rails:
server {
listen 80;
server_name ies.local;
root /home/jk/Projects/ies12/webapp/public; # <--- be sure to point to 'public'!
passenger_enabled on;
rails_env development;
rewrite ^/(?!assets) / last;
}
But by today, i left rails and i need to extend this rule..
If I do something like
server {
listen 80;
server_name webapp.local;
root /home/jk/Projects/webapp;
rewrite_log on;
rewrite ^/(?!angular) / last;
rewrite ^/(?!angular-ui) / last;
}
having webapp/index.html only file and getting:
*1 rewrite or internal redirection cycle while internally redirecting to
"/index.html", client: 127.0.0.1, server: webapp.local, request: "GET / HTTP/1.1", host: "webapp.local"
rewrite ^/(\?!angular(-ui){0,1}) / last;
– emka86 Jan 23 '13 at 7:12