wordpress windows虚拟主机 伪静态的设置方法?

发布时间:2021-09-18

  【第一步】

  新建文件fig 将下列代码复制进入,之后将文件拷贝到网站根目录

  

  <?xml version=1.0 encoding=UTF-8?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name=wordpress 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>

  【第二步】

  设置-》固定链接-》自定义结构,就可以自定义链接了

  同样的,可以使用的参数是

  

  可以使用的参数如下:

  %year%:文章发表的年份,四位数字,如2016

  %monthnum%:文章发表的月份,如03

  %day%:文章发表的日期,如07

  %hour%:文章发表的时间(小时),如10

  %minute%:文章发表的时间(分钟),如48

  %second%:文章发表的时间(秒),如28

  %postname%:文章别名,在发表文章时可以设置。

  %post_id%:文章的ID,如86

  %category%:分类别名,在添加分类时可以设置。

  %tag%:标签的别名,在添加标签时可以设置。

  

注册即送1000元现金券