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

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -