url rewriting - Rewrite URL of php page to be png -


i thinking of making tool own development similar placehold.it. have this.

<img src="url.com/picture.php?id=51"/> 

to be

<img src="url.com/51.png"/> 

any ideas?

edit: though have used stack overflow answer questions , looks stuff up, first time asking question. bit crazy. apparently isn't detailed enough. thought less more , seemed make sense.

anyway... wondering if can make php page behave image. able pass data php page, stuff variables, return content in form of image. example:

this

<img scr="url.com/picture.php?color=blue"/> 

could seen browser

    <img scr="url.com/blue.png"/> 

my guess needs done rewrite rule. have done little work in past making pretty urls (www.example.com/some/random/url vs example.com/somerandom.php?a=url) wasn't sure if changing type php png work.

hopefully make sense now.

you can using .htaccess.here rewriterule.

rewriteengine on rewriterule ^([0-9]+).png$ /picture.php?id=$1 [l] 

thanks.


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

java - Could not locate OpenAL library -

Non Unique Username with ASP.Net Identity 2.0 -