繁体   English   中英

如何在IIS中部署PHP应用程序

[英]How to Deploy Php Application In IIS

我想做下面的事情

在此处输入图片说明

在下面的文件夹结构中,应用程序文件夹包含我应用程序的源代码,该应用程序位于PHP中,并且PHP代码使用系统文件夹中的某些文件。应用程序文件夹位于wwwroot的外侧。

在此处输入图片说明

和我的wwwroot包含下面的文件。在此文件夹中,我有一个Web.config,其中包含如下所示的url编写:

 configuration>
  <system.webServer>
    <rewrite>
        <rules>
          <rule name="Imported Rule Test" stopProcessing="true">
            <match url="^(.*)$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
              <add input="{URL}" pattern="^system.*" ignoreCase="false" />
            </conditions>
            <action type="Rewrite" url="/index.php?/{R:1}" appendQueryString="false" />
          </rule>
          <rule name="Imported Rule 2" stopProcessing="true">
            <match url="^(.*)$" ignoreCase="false" />
            <conditions>
              <add input="{URL}" pattern="^application.*" ignoreCase="false" />
            </conditions>
            <action type="Rewrite" url="/index.php?/{R:1}" appendQueryString="false" />
          </rule>
          <rule name="Imported Rule 3" stopProcessing="true">
            <match url="^(.*)$" ignoreCase="false" />
            <conditions>
              <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
              <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            </conditions>
            <action type="Rewrite" url="index.php?/{R:1}" appendQueryString="false" />
          </rule>
        </rules>
      </rewrite>
  </system.webServer>
</configuration>

我的问题是如何在IIS 7中部署此PHP网站?

虚拟目录是在地址中使用的目录名称,它对应于服务器上的物理目录。 您可以添加一个虚拟目录,该目录将在站点或应用程序中包含目录内容,而不必将内容实际移动到该站点或应用程序目录中。

创建iis7站点应用程序和虚拟目录

另一个指南

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM