URL mapping can be done at .htaccess and we can edit routes.php. Learning PHP/Codeigniter, i posted this question. CodeIgniter Mod Rewrite Rules and the Controller
routes.php worked for me, and the next thing i'd like is to have access to the GET parameters in my URL. To elaborate on what i'm actually trying to do:
Case 1:
RewriteRule ^([a-z]+)/(at)/([a-z]+)$ index.php/person/show?personName=$1&place=$2 [L]
This doesn't work at the .htaccess as in the above question, but I can get that working in the routes.php
$route['([a-z]+)/at/([a-z]+)'] = "person/show/$1/$2";
If i try the routes.php as
$route['([a-z]+)/at/([a-z]+)'] = "person/show?personName=$1&place=$2";
I end up with a CodeIgniter 404. Is this fundamentally incorrect?
This works fine as is:
person/show?personName=chinmay&place=kino
Case 2:
URL which I want to expose:
chinmay?place=kino
where place is shown as a GET param. I would like to handle this, and knowing as much about routes.php-
$route['([a-z]+)\?place=([a-z]+)'] = "person/show/$1/$2"
This gives a CI 404 as well.