![]() |
Specific rewrite rule - 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: Specific rewrite rule (/showthread.php?tid=40424) |
Specific rewrite rule - El Forum - 04-08-2011 [eluser]Unknown[/eluser] Hi every one, I created in a same controller 4 pages which contain a form. I named my controller “my_controller” The 4 pages are in methods and I have 4 pages with this structure : - http://mydomain.com/index.php/my_controller/my_form1 - http://mydomain.com/index.php/my_controller/my_form2 - http://mydomain.com/index.php/my_controller/my_form3 - http://mydomain.com/index.php/my_controller/my_form4 I need to rewrite only this 4 pages like this - http://mydomain.com/my-new-url-form1.html - http://mydomain.com/my-new-url-form2.html - http://mydomain.com/my-new-url-form3.html - http://mydomain.com/my-new-url-form4.html (there is no other pages with this site) I created a HTACCESS Code: Options -Indexes I have always a 404 error page generated by codeIgniter (like if he does not find the good controller or good method) and no 404 error page generated by Apache Do you have an idea ? thank you Specific rewrite rule - El Forum - 04-08-2011 [eluser]toopay[/eluser] Then, you need to remove 'index.php' from your url, adding some URL suffix then create a route for each page. Read about CI uri here, and about routing here |