![]() |
htaccess problem with Multiple Applications - 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: htaccess problem with Multiple Applications (/showthread.php?tid=60372) |
htaccess problem with Multiple Applications - El Forum - 03-10-2014 [eluser]Unknown[/eluser] I am trying to set up a dual-app installation of CI. I have an index.php file for the user app, and an admin.php file for the administrator app. I have run into a problem: I found a StackOverflow question that seemingly has the exact same problem as me, however, the solution that the poster found does not work for me. I have played with the RewriteRules but nothing seems to work. The two rules I have set for redirecting anything with admin at the beginning aren't being met, so the 'catchall' rewrite rule at the bottom meant for the 'app' app redirection. The syntax for the pattern section of RewriteRule seems very straightforward (I'm not THAT bad with regex), so why doesn't it work? Code: application/ The htaccess rules are: Code: RewriteEngine On Essentially what I need is: type in example.com/admin - the url keeps the admin folder, and redirect the user to admin.php type in example.com/admin/controller/method - same as above type in example.com/anything_else - the user gets directed to the app instead of admin (index.php) In testing the person in the aforementioned post's htaccess, which mine are essentially copied from, in an online tester, the two rules involving URIs with 'admin' in it are not passed for some reason. I can only get admin (not ^admin$) to work as a pattern (according to the tester). |