2016-04-26 1 views
0

マイCodeIgniterのプロジェクトは、(私はLinuxのCPanelのを使用しています)ローカルホストにうまくマイcodeiginterプロジェクトはindex.phpをせずに働いていないオンラインで

https://localhost/project/profile

しかし、リンク内のindex.phpせずにそれがオンライン

動作しません。

https://domainname.in/index.php/profile

.htaccessファイル

RewriteEngine on 
RewriteCond $1 !^(index\.php|resources|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 

と私のroute.phpファイル

$route['default_controller'] = "pages/home"; 
$route['404_override'] = ''; 
$route['pages/profile'] = "pages/profile"; 
$route['creators'] = "pages/userList"; 
$route['auth/logout'] = "auth/logout"; 
$route['auth'] = "auth/logout"; 
$route['auth/login'] = "auth/login"; 
$route['auth/register'] = "auth/register"; 
$route['pages/post'] = "pages/post"; 
$route[$username.'/about'] = "pages/menus/about"; 
$route[$username.'/credibility'] = "pages/menus/credibility"; 
$route[$username.'/release'] = "pages/menus/release"; 
$route[$username.'/jobs'] = "pages/menus/jobs"; 
$route[$username] = "pages/userList/userview/$1"; 
+0

http://stackoverflow.com/questions/36906066/codeiginter-product-worked-well-in-localserver([Codeiginter製品はindex.phpのなしのLocalServerにうまく働いたが、サーバーで働いていない]の可能性のある重複-without-index-php-but-not-worked) – shruthi

答えて

0

これを試してみてください。うまくいけばうまくいくでしょう。あなたのルートと

更新は、私はそれが動作を期待プロジェクトフォルダ内の.htaccessファイルを作成します

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

私のLinuxパネルには.htaccessファイルが表示されません。 – shruthi

+0

htaccessファイルをメインフォルダまたはアプリケーションフォルダに配置する場所 – shruthi

+0

何も機能していません。 – shruthi

0

ファイル.htaccess.txt。

RewriteEngine on 
RewriteBase /projectfoldername/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond $1 !^(index\.php|js|img|css|captcha|robots\.txt) 
RewriteRule ^(.*)$ /projectfoldername/index.php/$1 [L]