Welcome Guest, Not a member yet? Register   Sign In
404 issue with CodeIgniter

Hi guy,

I'm working on a little URL shortner, just for fun, using CodeIgniter.
I have a URL like this:

This should call a controller called 'home', a function called 'new_url', and in terms of CodeIgniter, that last bit would be known as [i]$this->uri->segment(3)[/i]. Instead, I get this:

Not Found
The requested URL /index.php/home/new_url/http://google.com was not found on this server.

I should note that it isn't a 404 page generated by CodeIgniter, but the standard Apache 404 page.

I can take off [i]http%3A%2F%2F[/i], or just the third URI segment entirely, and it goes to the new_url function perfectly. Maybe I'm having a brainfart and missing some wildly obvious thing. I'm not sure where the URL is becoming un-urlencoded.

Thanks a bunch. I love you all.

the url you're setting after home I would use that as query string and not as a uri segment.

So something like


Otherwise codeigniter would identify those // as new uri segments. Also you would have to check your settings to see if those : and . are allowed. But if you use query strings you don't need any of that.
Website: marcomonteiro.net  | Blog: blog.marcomonteiro.net | Twitter: @marcogmonteiro | TILThings: tilthings.com

Thx, appreciate it!

Theme © iAndrew 2016 - Forum software by © MyBB