簡體   English   中英

Codeigniter:加載默認靜態頁面

[英]Codeigniter: Loading default static page

我在Codeigniter 3中創建了一個新的“ / blog”目錄。我想在此新文件夾中安裝一個新的Wordpress博客。

當我嘗試加載新文件夾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]

默認情況下,如何在我的Blog目錄中加載(index.php),而無需在瀏覽器的地址中鍵入index.php? 請幫我。

您必須在子文件夾“ / 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>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM