I have a file that exists at at a location and it works. I want to change the actual location of that asset server side without the client needing to change the curl command its using. How can I do this?
#Command I have today that I don't want to change.
curl -v -f -S http://ift.tt/2heU2KH > deploy.sh
In reality I want the request for /prod/linux/deploy.sh to be rewritten to /test1/deploy.sh
I've tried returning a 301 code which is what I've seen as the appropriate thing to do in other stackoverflow answers, but when I curl I get the literal 301 redirect message and not the file.
# location ~ ^/.*/linux/(.*) {
# return 301 /test1/$1;
# }
And I've tried rewriting the path which gives me a 403 forbidden, which doesn't sound right
# rewrite ^/(.*/linux/.*) /test1/$1 permanent;
Aucun commentaire:
Enregistrer un commentaire