2016-09-12 9 views
0

私はサーバーにWebをアップロードしようとしていますが、これはSuse 13です。Apache2.4とPHP 5.6がインストールされています。 Windowsでは同じWebがうまく動作しますが、Suseでは動作しません。方向バーに書き込むと、http://myip/myweb/index.php/ControllerName/MethodNameが動作しますが、ルーティングが機能していません。CodeIgniter 404ページのSuSeのルート

私は大文字のController.phpを内部に持っています。クラス名はControllerで、メソッドは小文字の "method"です。 routes.phpの中で私が持っている:

$route['default_controller'] = 'controller'; 
$route['bar/foo'] = 'controller/method'; 

マイconfig.phpファイル:

$config['base_url'] = 'http://myip/myweb/'; 
$config['index_page'] = ''; //I can see the index page correctly 
$config['uri_protocol'] = 'REQUEST_URI'; 

そして最後に、私の.htaccessファイル:私は助けを必要と

RewriteEngine On 
ServerSignature Off 

<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? 
</IfModule> 

<IfModule !mod_rewrite.c> 
ErrorDocument 404 /index.php 
</IfModule> 

<IfModule mod_deflate.c> 
AddOutputFilterByType DEFLATE text/plain 
AddOutputFilterByType DEFLATE text/html 
AddOutputFilterByType DEFLATE text/xml 
AddOutputFilterByType DEFLATE text/css 
AddOutputFilterByType DEFLATE application/xml 
AddOutputFilterByType DEFLATE application/xhtml+xml 
AddOutputFilterByType DEFLATE application/rss+xml 
AddOutputFilterByType DEFLATE application/javascript 
AddOutputFilterByType DEFLATE application/x-javascript 
AddOutputFilterByType DEFLATE model/vnd.collada+xml 
# remove browser bugs 
BrowserMatch ^Mozilla/4 gzip-only-text/html 
BrowserMatch ^Mozilla/4\.0[678] no-gzip 
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 
Header append Vary User-Agent 
</IfModule> 

、Iドン何をすべきかわかりません...

ありがとう!

EDIT:apacheの中

対応モジュール:

actions alias auth_basic authn_file authz_host authz_groupfile authz_user autoindex cgi dir env expires include log_config mime negotiation setenvif ssl socache_shmcb userdir php5 reqtimeout authn_core authz_core version man rewrite 

答えて

0

人、あなたがfは***間違っているかと思っている場合は、Apacheの設定ファイルにあなたが持っていることを知っている必要がありますAllowOverride Allを追加してください!

http://enarion.net/web/htaccess/mod_rewrite-on-suse/