CodeIgniter Forums
strange 404 (when i submit form method=get) (UPDATED) - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: strange 404 (when i submit form method=get) (UPDATED) (/showthread.php?tid=26751)



strange 404 (when i submit form method=get) (UPDATED) - El Forum - 01-22-2010

[eluser]molodoy[/eluser]
Hi all

My app is needed multiply checkboxes input.
There is 404 error appears when I submit form.
URL in this case looks like: http://site.tld/autosalons/?auto[]=260
Now, if i just put cursor in URL field of my browser and hit Enter, right page appears!

I've checked HTTP-headers.
When I've submitted form and 404 err:
Code:
GET /autosalons/?auto[]=288 HTTP/1.1
upd: forum changes url! "[" in url looks like % 5 B (without spaces) and "]" looks like % 5 D

When I hit Enter and all works fine:
GET /autosalons/?auto[]=288 HTTP/1.1


How can fix it?


strange 404 (when i submit form method=get) (UPDATED) - El Forum - 01-22-2010

[eluser]brandon.cordell[/eluser]
Checkout application/config/config.php

here is the default for permitted uri characters
Code:
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify with a regular expression which characters are permitted
| within your URLs.  When someone tries to submit a URL with disallowed
| characters they will get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible.  By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

try changing that array to 'a-z 0-9~%.:_\-][';


strange 404 (when i submit form method=get) (UPDATED) - El Forum - 01-23-2010

[eluser]molodoy[/eluser]
tried, but nothing changes.

I've also tried to leave $config['permitted_uri_chars'] blank, and it doesn't work :-(


[quote author="brandon.cordell" date="1264236821"]Checkout application/config/config.php

here is the default for permitted uri characters
Code:
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify with a regular expression which characters are permitted
| within your URLs.  When someone tries to submit a URL with disallowed
| characters they will get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible.  By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';

try changing that array to 'a-z 0-9~%.:_\-][';[/quote]