2015-05-14 75 views
0

我從另一個開發人員(誰不再可用,我不能要求他提供解決方案)傳出一個項目,他將多個codeignitor項目保存在一個文件夾中,並調用其中的每個項目通過他們各自的索引文件。CodeIgniter .htaccess爲我的文件結構

文件結構 - /var/www/html/{folder}/mobile_index.php

的mobile_index.php引用駐留在同一文件夾中mobile_index.php一個文件夾「移動」。

所以我調用的URL是 - 「xx.xx.xx.xx/{folder} /mobile_index.html」。此頁面打開的罰款,但當我點擊頁面內的任何鏈接(例如用戶),這將重定向到「xx.xx.xx.xx /用戶」

現在這頁是空白的,我的錯誤日誌說沒有頁面用戶在/ var/www/html/user中。但是,當我手動將鏈接轉換爲「xx.xx.xx.xx/{文件夾} /mobile_index.php/user」這個工程並打開頁面。我認爲該文件夾缺少.htaccess文件,但我不知道該文件中包含什麼,任何人都可以幫助我獲得鏈接再次運行?

這是我迄今爲止 -

RewriteEngine on 
    RewriteCond $1 !^(mobile_index\.php|images|robots\.txt) 
    RewriteRule ^(.*)$ /{folder}/mobile_index.php/$1 [L] 
+0

你有什麼迄今所做? – VeeeneX

+0

'RewriteEngine on RewriteCond $ 1!^(mobile_index \ .php | images | robots \ .txt) RewriteRule ^(。*)$ /{folder}/mobile_index.php/$1 [L]' –

+0

請將該代碼添加到您的問題 – VeeeneX

回答

1
Options +FollowSymLinks 
RewriteEngine On 
#RewriteBase/#on server, uncomment this line by removing hash'#' 
RewriteBase/

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .* mobile_index.php?/$0 [PT,L,QSA] 
+0

不起作用。這是我現在得到的錯誤 - 「/var/www/html/mobile_index.php'找不到或無法統計」 –

+0

將您的index.php重命名爲mobile_index.php –