2017-02-13 57 views

回答

0

寫下面的代碼在.htaccess文件

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

這是行不通的。我已經重新啓動apache2。它只是404時,我去http://api.url.com/Method=Test (我用我的網址替換url.com) –

+0

顯示我的編輯答案 –

+0

這也不起作用。我已經確認mod_rewrite已啓用並安裝在我的ubuntu 14.04 apache2安裝中。它仍然會返回一個404 –