2

CentOSを使用していますが、

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt|resources)
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteBase /var/www/html/site/

</IfModule>

しかし、同じ問題が発生して、index.php を使用したページは正常に動作しますが、index.php を削除すると動作しません...

4

5 に答える 5

0
RewriteEngine On
RewriteBase /site_root/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

$config['index_page'] = '';重要: 1. config.php ファイルで設定する必要があります。2. site_root は wamp/www/site_root のようなフォルダー名です。

于 2013-06-24T15:48:03.013 に答える
0

これを試してみてください。ccndは私のファイルフォルダーです。

RewriteEngine on
RewriteCond $1 !^(index\.php|uploads|images|css|js|lib|img|bootstrap|robots\.txt)
RewriteRule ^(.*)$ /ccnd/index.php/$1 [L]
于 2013-06-24T10:54:26.357 に答える
0

インデックスURL(index_page)のフォルダー検索でconfig.phpファイルを単純にし、空にしますconfig

$config['index_page'] = '';
于 2013-06-24T10:30:35.933 に答える