Home  >  Article  >  PHP Framework  >  The yii framework hides the index.php file

The yii framework hides the index.php file

王林
王林Original
2019-12-13 17:08:252476browse

The yii framework hides the index.php file

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.

AllowOverride appears three times in the Apache configuration file, but only one place requires All, and the other two places are None.

(3) Restart Apache

2. Add code to /protected/config/main.php in the project:



3. Add the file "The yii framework hides the index.php file.htaccess

" in the same directory as the index.php file, with the following content:

Complete! The yii framework hides the index.php file

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn