2017-04-04 53 views
0

我昨天發佈了關於從codeigniter路徑中刪除索引點PHP的問題,但問題沒有解決......所以任何一個人都可以來團隊查看器和解決我的問題......?感謝在期待codeigniter url造成錯誤在去除index.php

我的.htaccess在根文件夾

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

您是否在Web服務器上啓用了重寫模式? –

回答

1

你有你的.htaccess文件移動到的index.php存在目錄,如果存在從應用程序目錄中刪除。

然後將以下代碼粘貼到.htaccess文件中。

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

我假設你已經執行的其他步驟包括在WAMP打開重寫引擎,並在config.php

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

$config['index_page'] = ''; 

還設置

$config['uri_protocol'] = 'REQUEST_URI'; 

我希望它幫助。

+0

嘗試但錯誤.............................................. .........................................未找到 請求的URL/si/public/signup在此服務器上找不到。 Apache/2.4.9(Win64)PHP/5.5.12服務器在localhost端口80 –

+0

如何打開WAMP中的重寫引擎 –

+0

click:** WAMP icon-> Apache-> Apache模塊 - >選擇rewrite_module ** 和**重新啓動所有服務** –