• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to use $config['uri_protocol'] = "PATH_INFO"; with nginx server

Hi friends,

I am facing problem with nginx server.
I want to use $config['uri_protocol'] = "PATH_INFO"; but when I am using this it is showing me 404 error message. It is working with $config['uri_protocol'] = "REQUEST_URI";

But my few urls are like site.com/search/?a_aid=123456 for tracking a_aid on some other sites I need such urls.

If I used the site.com/search/?a_aid=123456 such url with $config['uri_protocol'] = "REQUEST_URI"; then it is showing the message "The URI you submitted has disallowed characters."

Can anyone help me to find out how to use PATH_INFO as uri_protocol or site.com/search/?a_aid=123456 with nginx.

This issue is solved now.
Go to system/libraries/URI.php & replace the line

if ( ! preg_match("|^[".str_replace(array('\\-', '\-'), '-', preg_quote($this->config->item('permitted_uri_chars'), '-'))."]+$|i", $str))


if ( ! preg_match("|^[".($this->config->item('permitted_uri_chars'))."]+$|i", rawurlencode($str)))

Also change the permitted_uri_chars value in config.php to
$config['permitted_uri_chars'] = 'a-z 0-9~%\.\:_\-';

And use the uri_protocal as,

$config['uri_protocol'] = "REQUEST_URI";

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.