Welcome! Log In Create A New Profile


Migrate from Apache, want to convert a rewrite rule

Posted by duydangle 
Migrate from Apache, want to convert a rewrite rule
August 02, 2012 02:59AM
Hello everyone, I am new to Nginx. Currently, there is a rewrite rule from apache that I want to convert to Nginx rewrite rule.

Here is the original rewrite rule:
RewriteEngine On
RewriteRule sig-(.*)-(.*).png$ sig.php?player_id=$1&background=$2 [L]

Previously I tried by convert to: Rewrite ^/ sig-(.*)-(.*).png$ [ADDRESS]/sig.php?player_id=$1&background=$2;
[ADDRESS] is the file path.

Of course the rule just redirect the address to the original address. But I really want to keep the cleaned address on the browser's address bar.

Hope you guys can help me.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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