2016-07-15 91 views
0

我在Codeigniter 3中創建了一個新的「/ blog」目錄。我想在這個新文件夾中安裝一個新的Wordpress博客。Codeigniter:加載默認靜態頁面

當我嘗試加載新文件夾www.mysite.com/blog/時,出現錯誤404消息。日誌顯示:

ERROR - 2016-07-15 17:42:40 --> 404 Page Not Found: Blog/index 

我的.htaccess文件內容爲:

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

我怎樣才能加載(的index.php)默認情況下我的博客目錄,沒有瀏覽器的地址輸入的index.php?請幫幫我。

+0

你可以嘗試「RewriteBase/blog /」而不是「RewriteBase /」嗎? – Julqas

+0

這個.htaccess文件位於根文件夾中,並且更改爲「RewriteBase/blog /」在www.mysite.com上顯示了Wordpress – user3864215

+0

哦,對不起,你的問題是直截了當地寫的,所以我明白了相反的意思。 – Julqas

回答

0

您必須在子文件夾「/ blog」中創建.htaccess文件。 內容可能是這樣的:

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

現在顯示**內部服務器錯誤** – user3864215

+0

您能否提供錯誤日誌? – Julqas

+0

內部服務器錯誤 服務器遇到內部錯誤或配置錯誤,無法完成您的請求。 請聯繫webmaster @@@@的服務器管理員,告知他們此錯誤發生的時間以及您在此錯誤發生前執行的操作。 有關此錯誤的更多信息可能在服務器錯誤日誌中可用。 此外,嘗試使用ErrorDocument處理請求時遇到500內部服務器錯誤錯誤。 – user3864215