Apache .htaccess to Nginx rewrite

Hi All,

I have a WP plugin and one of the futures is locking down the folder
based on access level of the member. But they only support .htaccess /
Apache.

I don’t want to scrap my nice NGINX installation for this problem. Can
you any of you help me in converting the following .htaccess files to
nginx config?

Thanks,

=====

each folder has a .htaccess file and they are as follows

/files/Silver/.htaccess

Options FollowSymLinks
RewriteEngine on
#RewriteCond %{REQUEST_URI} ^Silver/*
RewriteRule ^(.*)$ /index.php?wlmfolder=Silver&restoffolder=$1 [L]

/files/Gold/.htaccess

RewriteEngine on
#RewriteCond %{REQUEST_URI} ^Silver/*
RewriteRule ^(.*)$ /index.php?wlmfolder=Gold&restoffolder=$1 [L]

/files/Platinum/.htaccess

RewriteEngine on
#RewriteCond %{REQUEST_URI} ^Silver/*
RewriteRule ^(.*)$ /index.php?wlmfolder=Platinum&restoffolder=$1 [L]

Posted at Nginx Forum:

On 31 Out 2011 15h20 WET, [email protected] wrote:

Thanks,
RewriteRule ^(.*)$ /index.php?wlmfolder=Silver&restoffolder=$1 [L]

/files/Platinum/.htaccess

RewriteEngine on
#RewriteCond %{REQUEST_URI} ^Silver/*
RewriteRule ^(.*)$ /index.php?wlmfolder=Platinum&restoffolder=$1 [L]

Posted at Nginx Forum:
Apache .htaccess to Nginx rewrite

If you’re ok with an explicit redirect, try this for each folder:

location ^~ Silver/ {
return 302 /index.php?wlmfolder=Silver&restoffolder=$uri;
}

location ^~ Gold/ {
return 302 /index.php?wlmfolder=Gold&restoffolder=$uri;
}

location ^~ Platinum/ {
return 302 /index.php?wlmfolder=Platinum&restoffolder=$uri;
}

— appa