Url rewrite for restful url

Edward Stembler lists at ruby-forum.com
Wed Aug 8 18:30:57 UTC 2012


I have a Rails web app which has static files under dynamic restful
urls. For example:

/projects/1/attachments/some_file.xls

I want to setup Nginx to redirect to the static file on the server:

/public/attachments/1/some_file.xls

Where 1 is the dynamic project id.

How would the location block and rewrite statement look for the Nginx
config file?

StackOverflow link:
http://stackoverflow.com/questions/11852854/nginx-url-rewrite-for-restful-url

-- 
Posted via http://www.ruby-forum.com/.



More information about the nginx mailing list