2017-05-27 6 views
0

でのhtaccessファイルを使用せずにindex.phpを削除する方法私は私のプロジェクトのURLCodeIgniterの

index.phpを削除しようとしている私はちょうどhtdocsにCodeIgniterのフォルダを開き、このコードを貼り付けます。

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
#RewriteRule .* index.php/$0 [PT,L] 
#RewriteRule ^(.*)$ index.php/$0 [PT,L] 
RewriteRule ^(.*)$ index.php/$0 [QSA,L] 
#RewriteRule ^(.*)$ index.php?/$1 [L] 
#RewriteRule ^(.*)$ index.php/$1 [L] 
+1

なし、私たちではない –

+0

これは、それがWebサーバ機能CodeIgniterの機能ですされていません削除。これは.htaccessファイルを使って行う必要があります。 – Joe

答えて

0

codeigniter documentationに基づいて、あなたはの.htaccessファイルに次のコードを追加する必要がありますが、

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L]