2016-04-28 5 views
2

で働いていない私はcodeiginiter index.phpをせずに、ローカルサーバーで働いていた Codeiginter製品は、index.phpのなしのLocalServerにうまく働いたが、サーバー

(ローカルホスト/サンプル)

で一つのプロジェクトを作成している。しかし、私は上方制御する場合私はindex.phpの手段を与える場合は、デフォルトのコントローラのみが働いていたオンラインサーバー(cPanelのにlinux)、他の次のページのURLが働いていません...( https://sample/nextpage

にエド私は、インデックスを削除したい(https://sample/index.php/nextpage

を働きました.php、助けてください..

私のconfig.php

$config['index_page'] = 'index.php'; 
$config['uri_protocol'] = 'REQUEST_URI'; 

route.php事前にファイル

$route['default_controller'] = "pages/home"; 
$route['pages/profile'] = "pages/profile"; 
$route['creators'] = "pages/userList"; 
$route[$username] = "pages/userList/userview/$1"; 

$route['translate_uri_dashes'] = FALSE; 
$route['404_override'] = ''; 

私の.htaccessファイル

RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .* index.php/$0 [PT,L] 
Options All -Indexes 

おかげで、

Shruthi。変更.htaccessファイル

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

答えて

2

しようとすると、チェックmod_rewriteモジュールが有効かどうか

+0

ありがとうございました!...来る日曜日私のプロジェクトの開始日..あなたは私を救っただけです。 – shruthi

+0

あなたは大歓迎です。@shruthi –

2

であなたの.htaccessファイルのコードを変更する

+0

私はオンラインサーバー上にプロジェクトフォルダを持っていません。下にアップロードしてください。 – shruthi

+0

問題はありません。その行をスキップできます。 – shalini

+0

使用されたフラグが正しくありませんでした...これを参照してください:https://httpd.apache.org/docs/current/rewrite/flags.html – shalini

2

この

RewriteEngine On 
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L] 
RewriteCond $1 !^(index\.php|img|css|public|tmp|download|javascript|rte|document|xajax_js|robots\.txt) 
2

は、ホスティングプロバイダにお問い合わせくださいしてみてください、次の

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

@ sarvagnaで得た答え – shruthi

+0

続ける... !!!! –

関連する問題