Home > Backend Development > PHP Tutorial > rewrite语句从apache上搬到IIS上失效的有关问题

rewrite语句从apache上搬到IIS上失效的有关问题

WBOY
Release: 2016-06-13 12:57:04
Original
924 people have browsed it

rewrite语句从apache下搬到IIS下失效的问题
如题我有一个rewrite语句用于把请求全部重写到index.php,在apache的空间中一切正常,放到IIS6+isapi_rewrite3.0的环境下发现不能运行了,应该是环境不同规则有所变化,只有一句,求高手转换一下……

RewriteRule . index.php


------解决方案--------------------
引用:
引用:引用:再求指导……那你继续求吧,很少人会用到iis的,apache和nginx才是php的天下。
我知道……但是正好有这个需求……
iis这边是跑的isapi_rewrite3的dll,继续求……


如果已经配置好了IIS rewrite。可以使用以下代码放到httpd.ini

<br />
[ISAPI_Rewrite]<br />
<br />
# 3600 = 1 hour<br />
CacheClockRate 3600<br />
<br />
RepeatLimit 32<br />
<br />
<br />
#ThreadPost.php<br />
RewriteRule ^(.+)$ index\.php$1 [L]<br />
Copy after login
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