Welcome Guest, Not a member yet? Register   Sign In
Direct linking to an Image generating function
#1

[eluser]Ckirk[/eluser]
I have a function in my codeigniter application which generates an image and overlays text onto that image.
It works perfectly but what I'd like to do is link to that image in forums.
The problem is that the forums will only accept certain image extensions.

so http://myapp.com/image is invalid.

What I'd like to do is ,use http://myapp.com/image.png but obviously that's not a valid codeigniter url.

Have tried the following in the htaccess but obviously that wont fool codeigniter.
Code:
RewriteRule ^image.png$ image

Any ideas how to get around this?
#2

[eluser]Ckirk[/eluser]
It's ok... I worked it out.
Changed the routes.php as follows:

Code:
$route['image.png'] = "image";




Theme © iAndrew 2016 - Forum software by © MyBB