简体   繁体   中英

Allow URL parameters in CodeIgniter 1.7.2

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM