Home > Backend Development > PHP Problem > How to remove index.php in iis

How to remove index.php in iis

藏色散人
Release: 2023-03-02 07:44:01
Original
3447 people have browsed it

iis去掉'index.php的方法:首先打开“URL重写”,并点击右侧栏“导入规则”;然后填入重写规则,并点击右侧“应用”提交;最后关闭窗口,并在地址栏去掉“index.php”即可。

How to remove index.php in iis

iis去掉index.php

 1、首先的IIS里面安装有 url重写这个功能。

如果没有的话,就到下面这个地址下载安装一个: rewrite_x64_zh-CN.msi

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

How to remove index.php in iis

安装好之后 从新打开IIS管理器或者属性需要打开的网站就有了。

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

How to remove index.php in iis

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

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

 

How to remove index.php in iis

 应用之后,关闭窗口,在地址栏 去掉index.php试试应该就可以隐藏了。

更多相关知识,请访问PHP中文网

The above is the detailed content of How to remove index.php in iis. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template