my life

day to day

Nginx Rewrite to 404

May 14th, 2008

The following Nginx configuration technique will allow you to do rewrites to status codes.

rewrite ^.*?\.(?:swf|xml|gif|jpg|png|css|js)$ @404 break; location = @404 { return 404; }

add to del.icio.us    add to technorati favs    email this

Leave a Reply