Welcome Guest, Not a member yet? Register   Sign In
Pass variable with slashes in URI without it being interpreted as another segment
#1

[eluser]Unknown[/eluser]
I'm creating an image hosting site, I'm using mod_rewrite to intercept all incoming requests to the root folder where images are stored - /i/ - and silently redirecting it to a CI controller that will record various things about the image being accessed and then set the required header type and output the image.

I've got it working at the moment using a separate php file and using mod_rewrite to pass the requested image as a GET variable i.e RewriteRule (i/.*) access.php?i=$1 [L]

But now I want to point it to my CI controller http://localhost/images/access/IMAGE_PATH which would be done like: RewriteRule (i/.*) images/access/?i=$1 [L]

However the GET parameter never makes it, and if I try images/access/$1 then CI interprets the slashes in the image path as segments and I can't access the entire path using $this->uri->segment(3);

Is there a way around this and if so what is the "correct" way of doing so? Any help is appreciated.


Messages In This Thread
Pass variable with slashes in URI without it being interpreted as another segment - by El Forum - 09-02-2010, 03:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB