I am trying to use routes to redirect URLs with GET variables as follows:
$route['^(beautified-link)'] = "controller/function?param=6";
But he does not consider it. Please suggest
I'm not sure about this, but you can try by changing these values in the configuration file.
$config['uri_protocol'] = "PATH_INFO"; $config['enable_query_strings'] = TRUE;
and try accessing the url like
$this->input->get(‘param’);
$route['^(beautified-link)'] = "controller/function";
I think that this can be done only by specifying the controller and method, it is not necessary to maintain the route for passing the GET variable.
get?
URL config/autoload.php
$autoload['helper'] = array('url');
URL-,
http://example.com/controller/function/param
param , ,
$var=$this->uri->segment(3);
$var=$this->uri->segment(4);//depend of number of "/" that you put on the url
you need to include the query string in the configuration file.
$config['enable_query_strings'] = TRUE;
Source: https://habr.com/ru/post/1531564/More articles:Symfony2 POST data is empty when a form is submitted with certain files - phpWhat is the difference between autocorrelation in matplotlib and autocorrelation in pandas.tools.plotting? - pythonDetecting if a Windows 8.1 storage application is in SplittView or FullView - c #DownloadManager behaves strangely when the path to the destination file contains a space - androidDistinguish several columns in the hive - hadoopURL routing with codeigniter - phpSpring synchronized method NOT SYNCHRONIZED - spring-mvcКак сделать приложение iOS 7 обратно совместимым? - iosCannot find property file when running gradle test - javaEscaping scala reseverd word "type" in scala templete in game structure - javaAll Articles