1 つのコントローラー (main.php) を備えた codeigniter アプリがあります。
現在、index.php と main.php を削除するように htaccess ファイルを設定しています。
したがって、www.domain.com/index.php/main/function_name ではなく、単に www.domain.com/function_name です。
私のhtaccessファイルは次のようになります:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
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 ^(.*)$ index.php?/main/$1 [L]
ErrorDocument 404 /index.php
ここで、サイトに大きなピースを追加する必要があります。現在、別の codeigniter アプリに組み込まれており、移動する必要があります。サイトの新しい部分は controllers/manage_emails/contacts.php... にあります。
私の質問は、ほとんどの場合、htaccess ファイルを変更して main.php を URL から削除する方法ですが、www.domain.com/manage_emails/contollername を入力すると、適切なコントローラーに移動します。
ありがとう!