How do I migrate my Nginx's rewrite rules from dotCloud to Next dotcloud?

25 Views Asked by At

I have migrated a static app from dotcloud to Next dotCloud and found that my nginx regrite rules didn't work.

They redirect from

miappname.dotcloudapp.com/oldurl

to

miappname.dotcloudapp.com:someport/newurl

instead of

miappname.dotcloudapp.com/newurl

1

There are 1 best solutions below

0
alej0 On

The old nginx's rewrite rules must be migrated to by adding the domain name explicitly as follows.

Old rule

rewrite ^/oldurl /newurl redirect;

New rule

rewrite ^/oldurl $scheme://$host/newurl redirect;