.htaccess 具有多个应用程序的codeigniter htaccess

.htaccess 具有多个应用程序的codeigniter htaccess,.htaccess,codeigniter,.htaccess,Codeigniter,我正在使用codeigniter。我有前端应用程序和后端应用程序,如 /系统/ /应用/ /front/ /admin/ index.php admin.php .htaccess 我希望我的url像(网站) (用于管理) 我已经写了.htaccess RewriteEngine On # If the user types just "admin". RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL

我正在使用codeigniter。我有前端应用程序和后端应用程序,如

/系统/

/应用/

   /front/

   /admin/

index.php

admin.php

.htaccess
我希望我的url像(网站) (用于管理)

我已经写了.htaccess

RewriteEngine On
# If the user types just "admin".
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/admin$ admin\.php [L,QSA]

# If the user enter in any admin section, like "admin/section".
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]
前端工作正常,但当我进入mydomain.com/admin时,它抛出404 not found错误。请帮帮我


感谢并问候

我对.htaccess不太在行,但是从,您可以将其用于.htaccess规则

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
然后使用重写URL。比尝试在.htaccess文件中执行此操作容易得多