Welcome Guest, Not a member yet? Register   Sign In
Routing using post and get params
#1

[eluser]xylar[/eluser]
I have the following in my config/routes.php file:

$route['(:any)'] = "dashboard/index/$1";

This works as expected when visiting the following url: mysite.com/user/id , the function in the dashboard controller is called and the 1st param is 'user' and 2nd 'id'. However when passing through post and get values such as mysite.com/user/id?page=2 the function appears to ignore the post params and the 1st (and only) param is '2'.

Am I missing something in my route condition?
#2

[eluser]xylar[/eluser]
Could this be something to do with my config and htaccess setup?

In my config.php I have:

$config['uri_protocol'] = "AUTO";
$config['enable_query_strings'] = TRUE;

and .htaccess:

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]




Theme © iAndrew 2016 - Forum software by © MyBB