httpd.confで、を探します。
LoadModule rewrite_module modules/mod_rewrite.so
(まだ削除されていない場合は、行の先頭から#を削除します。)
OR
In wamp click on wampserver-> Apache -> Apache Modules and enable rewrite_module.
index.phpがあるディレクトリに.htaccessを作成し、次のコードを貼り付けます。
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
そしてprotected/config / main.php
'urlManager' => array(
'urlFormat' => 'path',
'showScriptName' => false,
'rules' => array(
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
),
それでもクリーンなURLが得られない場合は、仮想ホスト構成ファイル「httpd-vhosts」に移動して使用している場合は、構成を貼り付けてください。
<Directory "C:/wamp/www">
AllowOverride All
</Directory>