2
我使用codeigniter。我有前端應用和後端應用程序就像codeigniter htaccess與多個應用程序
/系統/
/應用/
/front/
/admin/
index.php
admin.php
.htaccess
我想我的網址像http://example.com/news/article1(站點) http://example.com/news/admin(用於管理員)
在.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未找到錯誤。請幫幫我。
感謝和問候