Welcome Guest, Not a member yet? Register   Sign In
Weird and stupid routing problem
#1

[eluser]sheldonnbbaker[/eluser]
Hey everyone,

I have a route to push all asset requests to an asset controller (controllers/asset.php).

Here's my route so far (just ignore the weirdness of it for now):

Code:
$route['assets/([0-9]+\/|)(([a-zA-Z0-9_\-]+/?)*)?(/[a-zA-Z0-9-]+)\.([a-zA-Z0-9]{2,})'] = "asset/index/0$1$5$4/$2";

So I can browse to http://localhost/assets/1/img/buttons.png and see an image, but when I go to http://localhost/assets/1/img/content-bo...ground.png, I get a CI-generated 404 error (ERROR - 2009-03-23 23:44:19 --> 404 Page Not Found --> assets).

This will happen with the slightest of spelling differences - /img/test-test-test.png works, but /img/test-test-tests.png does NOT work - I get the 404 error.

WTF is going on here?!?

Thanks Smile

EDIT: And yes, the images all live there - I can even take out all the image generation code and just do a die("I am dead"); at the controller constructor and still, changing one letter will cause the 404 error.
#2

[eluser]xwero[/eluser]
asset/index/0$1$5$4/$2 why is there a 0?
#3

[eluser]sheldonnbbaker[/eluser]
Longo tello, but basically is just there to give a number at the third URI segment if the user didn't specify one.




Theme © iAndrew 2016 - Forum software by © MyBB