0

私はWindows7を使用して開発しています。

codeigniterのアンカーに問題があります。エラーが発生します。

The requested URL /mysite/contact was not found on this server.

index.phpをアンカーに追加すると、機能します。

<?php echo anchor('index.php/contact', 'Contact Us', 'title="Contact"');?>

パーツを削除するとindex.php、上記のエラーが発生します。

WAMPを使用しており、リライトモジュールが有効になっています。私の設定には次のものがあります。

$config['base_url'] = 'http://localhost/mysite';

$config['index_page'] = '';

そして最後に、私が使用している.haccessがあります

RewriteEngine on
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
4

1 に答える 1

0

私はそれを考え出した。.htaccessファイルは、サイトのルートではなく、アプリケーションフォルダーにありました。

于 2013-01-10T01:43:49.843 に答える