The PHP rewrite settings in the IIS environment support Chinese parameters.
In the site root directory, add:
Web. config:
<?xml version= "1.0" encoding= "utf-8″?><configuration><system. Webserver><rewrite><rules><rule name= "Cnurl" stopprocessing= "true" ><match url= "!^ (index\ . Php|images|assets|robots\.txt) "/><action type=" Rewrite "url=" cnurl.php "/></rule><rule name=" Default "patternsyntax=" Wildcard "><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"/></rule></rules></rewrite>< /system.webserver></configuration>Cnurl. php:<?PHPif(isset($_server[' Http_x_original_url '])) {//IIS Mod-rewrite$_server[' request_uri '] =$_server[' Http_x_original_url '];} Else if(isset($_server[' Http_x_rewrite_url '])) {//IIS isapi_rewrite www.jbxue.com$_server[' request_uri '] =$_server[' Http_x_rewrite_url '];} Else {//Use Orig_path_info If there is no path_info(!isset($_server[' Path_info ']) &&isset($_server[' Orig_path_info '])) && ($_server[' path_info '] =$_server[' Orig_path_info ']);//Some IIS + PHP configurations puts the script-name in the Path-info (No need to append it twice)if(isset($_server[' Path_info '])) {($_server[' path_info '] = =$_server[' Script_name ']) ? ($_server[' request_uri '] =$_server[' Path_info ']) : ($_server[' request_uri '] =$_server[' Script_name '].$_server[' Path_info ']);}//Append The query string if it exists and isn ' t null(isset($_server[' Query_string ']) &&!Empty($_server[' query_string '])) && ($_server[' Request_uri ']. = '? ' .$_server[' Query_string ']);}require("index.php");
Support IIS environment to run all kinds of open source PHP projects, such as: Wordpress, Emlog, Typecho and so on.