Welcome! Log In Create A New Profile

Advanced

Converting htaccess rewrite rules to nginx

Posted by johnnymestizo 
Converting htaccess rewrite rules to nginx
December 04, 2011 03:43PM
Hi

I have a plugin called phpbay. it is pretty awesome. But its not working for nginx.

Can someone help rewrite the rules?


<IfModule mod_rewrite.c>
# this goes above ANY Wordpress htaccess code in the .htaccess file
# if your site is installed in a folder, ie: http://www.yoursite.com/folder/
# add the folder to name to the RewriteBase line, ie: RewriteBase /folder/
RewriteEngine On
RewriteBase /
RewriteRule ^media/1/images/e/(.*)$ http://thumbs.ebaystatic.com/pict/$1 [R,L]
RewriteRule ^media/1/images/f/(.*)$ wp-content/plugins/phpBay/media/images/$1 [R,L]
RewriteRule ^media/1/css/(.*)$ wp-content/plugins/phpBay/media/css/$1 [R,L]
RewriteRule ^watch-list-(.*)_(.*)_(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&ca mpaignid=$5&linktype=watch&mode=debug [R,L]
RewriteRule ^watch-list-(.*)_(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&li nktype=watch&mode=debug [R,L]
RewriteRule ^watch-list-(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&linktype=w atch&mode=debug [R,L]
RewriteRule ^watch-list-(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&linktype=watch&mode=d ebug [R,L]
RewriteRule ^watch-list-(.*)_(.*)_(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&ca mpaignid=$5&linktype=watch [R,L]
RewriteRule ^watch-list-(.*)_(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&li nktype=watch [R,L]
RewriteRule ^watch-list-(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&linktype=w atch [R,L]
RewriteRule ^watch-list-(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&linktype=watch [R,L]
RewriteRule ^bid-(.*)_(.*)_(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&ca mpaignid=$5&mode=debug [R,L]
RewriteRule ^bid-(.*)_(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&mo de=debug [R,L]
RewriteRule ^bid-(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&mode=debug [R,L]
RewriteRule ^bid-(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&mode=debug [R,L]
RewriteRule ^bid-(.*)_(.*)_(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&ca mpaignid=$5 [R,L]
RewriteRule ^bid-(.*)_(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4 [R,L]
RewriteRule ^bid-(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3 [R,L]
RewriteRule ^bid-(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2 [R,L]
RewriteRule ^bin-(.*)_(.*)_(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&ca mpaignid=$5&mode=debug [R,L]
RewriteRule ^bin-(.*)_(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&mo de=debug [R,L]
RewriteRule ^bin-(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&mode=debug [R,L]
RewriteRule ^bin-(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&mode=debug [R,L]
RewriteRule ^bin-(.*)_(.*)_(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&ca mpaignid=$5 [R,L]
RewriteRule ^bin-(.*)_(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4 [R,L]
RewriteRule ^bin-(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3 [R,L]
RewriteRule ^bin-(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2 [R,L]
RewriteRule ^item-(.*)_(.*)_(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&ca mpaignid=$5&mode=debug [R,L]
RewriteRule ^item-(.*)_(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&mo de=debug [R,L]
RewriteRule ^item-(.*)_(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&mode=debug [R,L]
RewriteRule ^item-(.*)_(.*)_debug.html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&mode=debug [R,L]
RewriteRule ^item-(.*)_(.*)_(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4&ca mpaignid=$5 [R,L]
RewriteRule ^item-(.*)_(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3&ccid=$4 [R,L]
RewriteRule ^item-(.*)_(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2&country=$3 [R,L]
RewriteRule ^item-(.*)_(.*).html$ wp-content/plugins/phpBay/auction.php?title=$1&item=$2 [R,L]
</IfModule>

Cheers

Johnny
Re: Converting htaccess rewrite rules to nginx
December 07, 2011 02:50AM
No takers?

Johnny
Re: Converting htaccess rewrite rules to nginx
December 16, 2011 03:48AM
Did you try this site ... might take some of the grunt work out of it for you ..

http://www.anilcetin.com/convert-apache-htaccess-to-nginx/

I notice these forums are pretty silent. I've been talking to myself for the last week in another thread.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 184
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