codeigniter url routing with query string -
i have 2 url in project
http://example.com/one.html?param1=value¶m2=value
in route file have rules below
$route['search/one?(:any)'] = 'advance_search/books'; $route['search/one'] = 'advance_search/index';
when call 2nd url query string still call index method. 1 fix wrong.
try route like
http://example.com/index.php/controller_name?param1=value¶m2=value
controller has php file
make sure first letter upper case on class , file name.
controllers/one.php
<?php class 1 extends ci_controller { public function index() { echo $this->input->get('param1'); } }
if need remove index.php try of these htaccess
Comments
Post a Comment