Home>Article>Backend Development> Can a php website be deployed under iis?
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.
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:
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!