Welcome Guest, Not a member yet? Register   Sign In
CI 1.7.3 Enable Query Strings
#1

[eluser]blasto333[/eluser]
I am talking to a credit card api and information is returned in the query string (so I have to enable it).

When I do:

http://HOST.com/PHP-Point-Of-Sale/index....ext=Credit card number is required.

IT WORKS FINE (Notice 2 query string parameters)


BUT WHEN I DO:

http://HOST.com/PHP-Point-Of-Sale/index....ext=Credit card number is required.

I GET a 404 error, why is this?
#2

[eluser]web-johnny[/eluser]
[quote author="blasto333" date="1303103820"]I am talking to a credit card api and information is returned in the query string (so I have to enable it).

When I do:

http://HOST.com/PHP-Point-Of-Sale/index....ext=Credit card number is required.

IT WORKS FINE (Notice 2 query string parameters)


BUT WHEN I DO:

http://HOST.com/PHP-Point-Of-Sale/index....ext=Credit card number is required.

I GET a 404 error, why is this?[/quote]
It's because you have the uri_protocol to AUTO .You have to change the
Code:
$config['uri_protocol']    = 'AUTO';
in the config.php to PATH_INFO or QUERY_STRING (its different from server to server).
Usually is PATH_INFO
#3

[eluser]blasto333[/eluser]
Could you explain/point me to the right location that explains URI protocol?
#4

[eluser]web-johnny[/eluser]
[quote author="blasto333" date="1303159659"]Could you explain/point me to the right location that explains URI protocol?[/quote] It is at your application path at config folder , for example application\config\config.php or system\application\config\config.php (in line 43-44). I post my code of the config

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|    http://example.com/
|
*/
$config['base_url']    = "http://".$_SERVER['HTTP_HOST'];
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = "";

/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'        Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'        Uses the REQUEST_URI
| 'ORIG_PATH_INFO'    Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol']    = "PATH_INFO";

^^ The last line show you where it is ^^
#5

[eluser]blasto333[/eluser]
I guess I don't understand what is wrong with AUTO?
#6

[eluser]web-johnny[/eluser]
[quote author="blasto333" date="1303160261"]I guess I don't understand what is wrong with AUTO?[/quote] I don't know what's wrong with that but it will solve your problems . Try it and you will see ;-)




Theme © iAndrew 2016 - Forum software by © MyBB