php - CodeIgniter Multi Application htaccess issue -
before tell me go codeigniter multi-application .htaccess problem, hear me out.
the reason because problem seems exact same posters. directory structure is:
application/ admin/ app/ .. .htaccess admin.php index.php the htaccess rules are:
rewriteengine on rewritebase /dev/ rewritecond %{request_uri} ^system.* rewriterule ^(.*)$ /index.php?/$1 [l] rewritecond %{request_uri} ^application.* rewriterule ^(.*)$ /index.php?/$1 [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^admin$ admin\.php [l,qsa] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^admin\/(.*)$ admin\.php/$1 [l,qsa] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index\.php/$1 [l,qsa] essentially need is:
type in example.com/admin - url keeps admin folder, , redirect user admin.php
type in example.com/admin/controller/method - same above
type in example.com/anything_else - user gets directed app instead of admin (index.php)
in testing person in aforementioned post's htaccess, mine copied from, in online tester, 2 rules involving uris 'admin' in not passed reason. can admin (not ^admin$) work pattern (according tester).
rewriterule ^dev/admin(\/?) admin.php? [l,qsa] should you. account /admin, /admin/ , /admin/whatever/here. latter, aware since have qsa on append destination url so: /admin.php?whatever/here.
Comments
Post a Comment