[eluser]Clifford James[/eluser]
Goodmorning!
I'm not able to read the GET variable search from this url:
http://anyshop.nl/search?search=trixie
What am I doing wrong? Enabling query strings and changed the uri protocol a couple of times but
I just can't get it to work.
My .htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
My routes:
Code:
$route['default_controller'] = "home_controller";
$route['scaffolding_trigger'] = "";
$route['admin'] = "admin/admin_controller/index";
$route['admin/([^/]*)(.*)'] = "admin/$1_controller$2";
$route['search'] = "search_controller";
$route['login'] = "account_controller/login";
$route['register'] = "account_controller/register";
$route['(:any)/(:any)/(:any)'] = "product_controller/view/$1/$2/$3";
$route['(:any)/(:any)'] = "category_controller/view/$1/$2";
$route['(:any)'] = "category_controller/view/$1";
My config:
Code:
$config['uri_protocol'] = "AUTO";
$config['enable_query_strings'] = FALSE;
My controller:
Code:
<?php
class Search_controller extends MY_controller {
function index() {
var_dump($this->input->get('search'));
}
}