Php 使用IIS 6重写IIRF url
我想重写此url: “www.mydomain.com/myproject/index.php?function=demo” 到 “www.mydomain.com/myproject/home/demo” 我的iirf.ini文件中有以下代码:Php 使用IIS 6重写IIRF url,php,url-rewriting,iis-6,iirf,Php,Url Rewriting,Iis 6,Iirf,我想重写此url: “www.mydomain.com/myproject/index.php?function=demo” 到 “www.mydomain.com/myproject/home/demo” 我的iirf.ini文件中有以下代码: RewriteEngine on StatusInquiry On /iirfSatus RewriteLog c:\Inetpub\ RewriteLogLevel 3 RewriteBase / RewriteCond %{REQUEST_FI
RewriteEngine on
StatusInquiry On /iirfSatus
RewriteLog c:\Inetpub\
RewriteLogLevel 3
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/myproject/home/(.*)$ /myproject/index.php?function=$1 [L]
当我浏览第二个链接时,仍然会出现404错误,我不知道为什么。
任何帮助都将不胜感激 再搜索一个小时后,我自己发现了这个问题: 问题是我的Iirf.ini文件位于错误的文件夹中。 它位于wwwroot中,而不是我的项目文件夹中。
它现在可以正常工作了我很困惑:RewriteCond是apache,但是你想要IIS的答案吗?我使用iirf重写我的URL,它使用相同的语法。iirf是IIS的扩展