1

I am using CodeIgniter version 1.7.2. I need to allow url parameters, for example

http://www.mydomain.com/?test=test. 

I try to change uri_protocol from

   $config['uri_protocol'] = "AUTO" 

to

   $config['uri_protocol'] = "PATH_INFO" 

and it worked but then all my other links like

http://www.mydomain.com/test  does not work. 

What is solution here?

I also tried to use permitted_uri_chars

but I can't made it work.

bensiu
  • 24,660
  • 56
  • 77
  • 117
Lina
  • 627
  • 4
  • 18
  • 35
  • 1
    I was also forced to work on an old CI install and needed querystring support. This is what helped me: http://stackoverflow.com/a/10283196/844726 – swatkins Jan 03 '13 at 14:34
  • did you use routes.php ? also you should report errors you see when it doesn't works, try enabling logs, then be sure you have a default controller defined in your config.php – itsme Jan 03 '13 at 19:36

1 Answers1

0

The above link from swatkins answers your question but I would have a serious think about using this approach, it's messy, search engines are not big fans and it opens up security vulnerabilities and I really can't think of any good reason to do it.

You can use a get request with a standard URI and pass your parameters via that, using this approach will encourage you to process and check input properly.

SwiftD
  • 5,769
  • 6
  • 43
  • 67