Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rewrite php to png with some pramaters on .htaccess

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..

like image 998
wotan Avatar asked Dec 21 '25 15:12

wotan


1 Answers

Try:

RewriteRule ^svlist/([^/]+)/([0-9.]+):([0-9]+)\.png$ /svlist/sv_image?ip=$2&port=$3&game=$1 [L,QSA]
like image 74
Jon Lin Avatar answered Dec 23 '25 07:12

Jon Lin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!