[eluser]Unknown[/eluser]
hi, i'm new to CodeIgniter and I want to ask about URL rewrite in CI.
I've managed to omit the inclusion of index.php so my URL is mysite/controller_name/method name.
for example : mysite.com/home/index
of course i've done the autoload controller in routes.ph so the url above is the same as
mysite.com
recently, i want to create a new page which will pass some variables. here's the url i intend to get to work.
mysite.com/read/novel-title/chapter-number as in
mysite.com/read/harry-potter/1
my question is, how should i do it? when i put the read function in home.php controller, i have to access mysite.com/home/read/harry-potter/1 to open the page which is quite tedious. i don't need the home part. on the other hand, if i create a new controller, read.php, i have to access mysite.com/read/index/harry-potter/1 or mysite.com/read/other-function-name/harry-potter/1 which is also tedious and ugly.
i hope my point is clear. thanks in advance.