国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Home Backend Development PHP Problem Can a php website be deployed under iis?

Can a php website be deployed under iis?

Jan 26, 2022 am 10:25 AM

The PHP website can be deployed under iis. The operation method is: 1. Start the iis server and open the IIS server; 2. Create the website; 3. Click "Handler Mapping" and click "Add Mapping Module" on the right "; 4. Add the default document and enter "index.php"; 5. Use URL rewriting.

Can a php website be deployed under iis?

The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer

Deploy PHP on IIS Website

Before deploying the website, check whether CGI has been installed on the system

1. Start the iis server and open the IIS server

Open the IIS server, click on the website, and right-click "Add website"

2. Create a website

After clicking "Add website", enter the page and fill in the website-related content, such as: website name, physical path (the folder where the website is located), click "OK" to create successfully

3. PHP settings

Click on the created website and click "Handler Mapping" , click "Add Mapping Module" on the right, enter the corresponding parameters in the pop-up layer, and click Confirm

Set default document

Click "Default Document", right-click the "Add" button, add a default document, enter index.php, click "OK" to add

4. Install urlrewrite

5. Use URL rewrite

Click "URL Rewrite" and click " "Import Rules", select the rule file to be imported, and click Apply

After applying the rules, a web.config file will be generated in the root directory of the website. This uses the rules for importing thinkphp's .htaccess file

File content:

<?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <system.webServer>
         <rewrite>
             <rules>
                 <rule name="已導(dǎo)入的規(guī)則 1" stopProcessing="true">
                     <match url="^(.*)$" ignoreCase="false" />
                     <conditions logicalGrouping="MatchAll">
                         <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                         <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                     </conditions>
                     <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
                 </rule>
             </rules>
         </rewrite>
         <handlers>
             <add name="php-cgi" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="D:\phpStudy\php56n\php-cgi.exe" resourceType="File" />
         </handlers>
         <defaultDocument>
             <files>
                 <add value="index.php" />
             </files>
         </defaultDocument>
     </system.webServer>
 </configuration>

Recommended study: "PHP Video Tutorial"

The above is the detailed content of Can a php website be deployed under iis?. For more information, please follow other related articles on the PHP Chinese website!

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

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)