用.htaccess中的一些参数重写php到png

I want rewrite my link

/svlist/sv_image.php?ip=109.73.77.38&port=35115&game=cs2d

to

/svlist/cs2d/109.73.77.38:35115.png

I'm really new on that stuff.

RewriteRule ^(svlist)/([^.]*)\/([0-9]+):([^.]*)\.png$ $1/sv_image.php?ip=$3&port=$4&game=$2 [L,NC]

I tried this one and failed..

Try:

RewriteRule ^svlist/([^/]+)/([0-9.]+):([0-9]+)\.png$ /svlist/sv_image?ip=$2&port=$3&game=$1 [L,QSA]

If you want to rewrite /svlist/$var1/$var2:$var3.png into /svlist/sv_image.php?ip=$var2&port=$var3&game=$var1 you could check this:

# once per .htaccess file
Options +FollowSymlinks
RewriteEngine on

RewriteRule ^svlist/([a-z0-9-_]+)/([0-9\.]*):([0-9]*).png /svlist/sv_image.php?ip=$2&port=$3&game=$1 [L,NC]

But if the URLs that you want to rewrite are /svlist/sv_image.php?ip=$var1&port=$var2&game=$var3 into /svlist/$var3/$var1:$var2.png then try to check these rewrite condition and rule:

RewriteCond %{QUERY_STRING} ip=([0-9\.]*)&port=([0-9]*)&game=([a-z0-9-_]+)
RewriteRule ^svlist/sv_image.php /svlist/%3/%1:%2.png [L,NC]