* Roberto De Ioris <[email protected]> [2013-03-16 16:46]: > >> Hi, >> >> I've a problem getting rewriting via router_rewrite to work, the >> following rewrite rule does not seem to do anything: >> >> $ ./uwsgi >> --plugins=0:notfound,http,router_redirect,router_rewrite,router_static >> --http-socket=:8080 --check-static=$PWD --route-uri='^/logo$ rewrite-last: >> /logo_uWSGI.png' >> $ curl -I http://127.0.0.1:8080/logo >> HTTP/1.1 404 Not Found >> Connection: close >> Content-Type: text/plain >> >> $ curl -I http://127.0.0.1:8080/logo_uWSGI.png >> HTTP/1.1 200 OK >> Content-Type: image/png >> Content-Length: 5971 >> Last-Modified: Sun, 10 Mar 2013 21:24:48 GMT >> >> Am I doing something wrong or is this a bug? This isn't related >> to bug #183, it happens before the fix as well. >> -- >> Guido Berhoerster >> _______________________________________________ >> > > Check-static happens before routing. What you "rewrite" are the CGI vars > (PATH_INFO and QUERY_STRING) passed to the plugin.
Ok, that makes sense, my expectations are still heavily influenced by mod_rewrite and nginx's httprewrite module. > Hint: are you sure you do not need a "static" plugin like the 404 one ? I suppose, together with autoindex functionality it could probably completely replace the need for a webserver like nginx, lighttpd, or apache. But currently no such thing exists, right? > Obviously the "static" router could be a good solution too Yes, I only ran into this when looking for a workaround for bug #183. -- Guido Berhoerster _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
