Redirect image.gif to controller/function/image |
[eluser]DrDave[/eluser]
Hello, I am working on dynamically generated images. I'm trying to have the url http://domain.com/rankimg/123.gif redirected to http://domain.com/index.php/rank/image/123 so that whatever the image is called, the name will be passed as a variable to the image function of the rank controller. This is my .htaccess: Code: RewriteEngine On Using this, I get a 404 error, however going to http://domain.com/index.php/rank/image/123 produces the image. Any ideas what I am doing wrong? Thanks in advance!
[eluser]DrDave[/eluser]
I figured out how to do it using URI routing. I added this line to config/routes.php Code: $route['rankimg/(:num).gif'] = "rank/image/$1"; |
Welcome Guest, Not a member yet? Register Sign In |