Home >Backend Development >PHP Problem >Apache removes index.php method

Apache removes index.php method

Guanhui
GuanhuiOriginal
2020-05-04 14:54:355232browse

Apache removes index.php method

Apache去掉index.php方法

1、首先打开Apache的httpd.conf配置文件;

Apache removes index.php method

2、然后将mod_rewrite.so模块开启;

Apache removes index.php method

3、再搜索“AllowOverride None”将None改为All。

Apache removes index.php method4、在项目根目录创建.htaccess文件并写入下面代码

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

The above is the detailed content of Apache removes index.php method. 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

Related articles

See more