CodeIgniter Forums
url problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: url problem (/showthread.php?tid=75341)



url problem - kulfik - 01-28-2020

hi, 

i am trying to use codeigniter to write directadmin module. 
direct admin url looks : 
http://domain:2222/CMD_PLUGINS/myplugin/index.html?var1=1&var2=2

index.html working as php ofcourse. 

but i have problem(do not know) how to tell CI to use routing like 

http://domain:2222/CMD_PLUGINS/myplugin/index.html?controller=home&method=index&var=test


RE: url problem - php_rocs - 01-28-2020

@kulfik,

I never like to assume. What version of CI are you using? Have you read the documentation that explains how routing works in CI? (CI3: https://codeigniter.com/user_guide/general/routing.html?highlight=routing#uri-routing ) (CI4: https://codeigniter4.github.io/userguide/incoming/routing.html?highlight=routing#uri-routing )


RE: url problem - kulfik - 01-28-2020

i found : https://codeigniter.com/user_guide/general/urls.html?highlight=url#enabling-query-strings
but it is ci3 is there a way to do this in ci4?


RE: url problem - InsiteFX - 01-29-2020

Not sure if this will help but look at it.

The Request URL

PHP Code:
echo $uri->getQuery();          // foo=bar&bar=baz 



RE: url problem - kulfik - 01-29-2020

it is not a problem get query string. problem is force ci4 to use it for route.


RE: url problem - InsiteFX - 01-29-2020

The only other thing that I found in the documentation was this.

URI Strings


You may need to ask Lonnie about this because I searched the documentation and found
nothing on the old way of doing it. It may be doing it automatically in one of the classes.