![]() |
Userfriendly urls without moderewrite? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Userfriendly urls without moderewrite? (/showthread.php?tid=60041) |
Userfriendly urls without moderewrite? - El Forum - 01-04-2014 [eluser]olof84[/eluser] Hi! I a, trying to learn Codeigniter, but one questions puzzles me, and I have not yet found it´s answer. How come Codeigniter framework can read userfriendly url ![]() I guess my question is this: can CodeIgniter somehow write userfriendly url ![]() I apologize for my noob question. Userfriendly urls without moderewrite? - El Forum - 01-04-2014 [eluser]Tpojka[/eluser] Read user manul on this page if that can solve your issue. Userfriendly urls without moderewrite? - El Forum - 01-07-2014 [eluser]olof84[/eluser] I am not sure how that answers my question. Perhaps I should specify my question better. How can CI can read a URI with PHP, and direct it to specific files? For example, if I write the URI mysite.com/blog/article/5 a normal webbserver domain without moderewrite will try to find a folder called blog; which should have an subfolder called article. But CI projects do not seem to be built this way. CI seem to redirect the URI to specific files, just like the PHP layer moderewrite does. But how CI do it without moderewrite puzzles me. EDIT: Maybe I got it now, correct me if I am wrong. It seems like my webbrowser begin by reading index.php, no matter what I write after index.php/. So by first reading index.php CI can check what the following segments are, and then redirect the user to the right file. Userfriendly urls without moderewrite? - El Forum - 01-07-2014 [eluser]Massaki[/eluser] .htaccess redirects all to index.php, unless you define other rules. Then, index.php loads all the CodeIgniter mechanisms to segregate URI to controller, method and arguments. If you define something else in routes.php, you can simplify url or hide controller/method names. |