htaccess conversion nginx

Nginx User nginx at nginxuser.net
Sun Feb 19 20:45:35 UTC 2012


On 19 February 2012 15:18, rooxy <nginx-forum at nginx.us> wrote:
> nginx: [emerg] directive "rewrite" is not terminated by ";" in
> /usr/local/nginx/

Whenever '{' and '}' appear in a rewrite, the rewrite must be enclosed
in quotation marks.

So change the rewrites to ...

rewrite '^/([0-9a-zA-Z]{1,6})$' /links/?to=$1 last;
rewrite '^/([0-9]{1,9})/banner/(.*)$' /links/?uid=$1&adt=2&url=$2 last;
rewrite '^/([0-9]{1,9})/(.*)$' /links/?uid=$1&adt=1&url=$2 last;



More information about the nginx mailing list