私は問題があります。CodeIgniter フレームワークの URL から index.php を削除する必要があります。誰でも私を助けることができますか?
3 に答える
2
lighttpd の場合:
mod_rewrite モジュールを有効にして、これを lighttpd.conf に設定します
server.document-root = "/var/www/ci/",
url.rewrite-once = (
"/(.*)\.(.*)" => "$0",
"/(css|files|img|js|stats|user_guide)/" => "$0",
"^/([^.]+)$" => "/index.php/$1"
)
于 2014-05-25T17:15:12.347 に答える
0
プロジェクト フォルダーに .htaccess ファイルを作成し、次のように記述するだけです。
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
#And You don't need to define in base_url in config file:
$config['base_url'] = '';// blank it.
お分かりできると良いのですが..
于 2015-06-11T12:12:59.083 に答える