Help with Simple rewrite conversion
February 08, 2010 02:25PM
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;
}

}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready