1. Modify Apache’s configuration httpd.conf
(1) Enable apache’s mod_rewrite
module
Remove## The "#" symbol before #LoadModule rewrite_module modules/mod_rewrite.so (2) Make sure there is "
AllowOverride All in
Note: For wamp, the second AllowOverride All is already turned on.
3. Add the file ".htaccess
" in the same directory as the index.php file, with the following content:Complete!
Recommended related articles and tutorials:yii tutorial
The above is the detailed content of The yii framework hides the index.php file. For more information, please follow other related articles on the PHP Chinese website!