Welcome Guest, Not a member yet? Register   Sign In
why do i get a 404 when adding a query string to a url
#1

[eluser]sfurrh[/eluser]
The following url works:

http://localhost/login

But if I add a query string to it like:

http://localhost/login?curl=something

Then I get a 404.

What's up with that?
#2

[eluser]joshbuckley[/eluser]
The = sign isn't 'valid' by default - CodeIgniter checks the url for characters which could cause problems, if there are, an error gets triggered. You can add "\=" to Allowed URL Characters section of config.php
#3

[eluser]sfurrh[/eluser]
why wouldn't it be valid (other than it is not among the allowed characters)? how else would you specify GET parameters?
#4

[eluser]joshbuckley[/eluser]
Think its more of a security thing, as GET is disabled by default in CI. Just add "\=" (without the quotes) to the end of the string in config.php, and it should work.




Theme © iAndrew 2016 - Forum software by © MyBB