IIS环境下隐藏index.php

1、打开链接:

http://www.microsoft.com/zh-cn/download/confirmation.aspx?id=7435

2、保存文件:

 rewrite_x64_zh-CN.msi

3、安装

4、重新打开IIS服务器管理器 或者 刷新要操作的网站

5、管理区多了“URL重写”选项:


6、打开“URL重写”,点击右侧栏“导入规则”:


7、填入 重写规则 ,然后点击右侧“应用”提交:

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

猜你喜欢

转载自blog.csdn.net/qq_36376116/article/details/80376054