2
我一直在为这个工作几个小时,现在试图让这个工作。我有一个CodeIgniter网站,用于运行正常的Apache服务器。我正在使用Apache URL重写器来隐藏index.php。出于某种原因,我无法让这个工作在IIS上。我已经Google了它,并提出了几个不同的选项,但有些或者没有工作或重定向到我的根目录。IIS 7 URL重写
我试图重写URL像这样 http://domain.com/v2.3.1/index.php/test
下面是从web.config
文件我的规则:
<rewrite>
<rules>
<rule name="Clean URL" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
当前配置会送我回到我的根目录。我的网站位于下面的例子网址:
http://domain/v2.3.1
- 这会带给我到我的主页
然而
http://domain/v2.3.1/test
- 带我回http://domain
但URL从来没有从http://domain/v2.3.1/test