IIS8.5 pseudo-static rule setting under Windows2012 R2 (WordPress instance)

Source: Internet
Author: User

Description

Operating system: Windows Server R2

Web server: IIS 8.5

Web program: WordPress

Site Root: C:inetpubwwwroot

Website Domain name: www.111cn.net

To achieve the purpose:

Configure WordPress pseudo Static

Specific actions:

First, verify that IIS 8.5 is installed with IIS URL Rewrite

Open: Control Panel system and security management tools Internet Information Services (IIS) Manager

See URL rewrite to indicate that the is URL Rewrite has already been installed, otherwise install this plugin first.

IIS URL rewrite download: Http://download.microsoft.com/download/4/E/7/4E7ECE9A-DF55-4F90-A354-B497072BDE0A/rewrite_x64_zh-CN.msi  

Double-click the default installation

Ii. Add IIS 8.5 pseudo-static rule files

1, new Web.config file, add the following code, save

<?xml version= "1.0" encoding= "UTF-8"?>

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name= "category" >

<match url= "category/? (. *) "/>

<conditions logicalgrouping= "Matchall" trackallcaptures= "false"/>

<action type= "Rewrite" Url= "/index.php?category_name={r:1}" appendquerystring= "false" Logrewrittenurl= "false"/ >

</rule>

<rule name= "Tags" >

<match url= "tag/? (. *) "/>

<conditions logicalgrouping= "Matchall" trackallcaptures= "false"/>

<action type= "Rewrite" Url= "index.php?tag={r:1}"/>

</rule>

<rule name= "Main rule" stopprocessing= "true" >

<match url= ". *"/>

<conditions logicalgrouping= "Matchall" trackallcaptures= "false" >

<add input= "{request_filename}" matchtype= "Isfile" negate= "true"/>

<add input= "{request_filename}" matchtype= "Isdirectory" negate= "true"/>

</conditions>

<action type= "Rewrite" Url= "index.php/{r:0}"/>

</rule>

<rule name= "WordPress" patternsyntax= "Wildcard" >

<match url= "*"/>

<conditions logicalgrouping= "Matchall" trackallcaptures= "false" >

<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>

2, the web.config copy to the site root directory: C:inetpubwwwroot

Third, set up WordPress

Go to website management backstage

Settings-Fixed links-Custom structure

Fill in:/archives/%post_id%.html

Save

System Yun-wei Www.111cn.net warm reminder: qihang01 original content copyright, reproduced please indicate the source and the original link

As shown in the following figure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.