I have an .htaccess that I'm trying to convert to Nginx
here is the .htaccess code
RewriteCond %{QUERY_STRING} !^swf.php?id=$1
RewriteRule p_(.*)\.swf swf.php?id=$1&ac=p&%{QUERY_STRING} [L]
RewriteRule s_(.*)\.swf swf.php?id=$1&ac=s&%{QUERY_STRING} [L]
here is what I have so far but isn't working
#set Application Root
location / {
root /var/www/myapp;
autoindex on;
index index.php;
allow all;
if (!-e $request_filename){
rewrite p_(.*)\.swf swf.php?id=$1&ac=p&$1 last;
rewrite s_(.*)\.swf swf.php?id=$1&ac=s&$1 last;
}
}