wordpress windows虛擬主機(jī) 偽靜態(tài)的設(shè)置方法?
2016-03-07 11:32:31
12960
下面介紹一下藍(lán)隊(duì)windows虛擬主機(jī),wordpress偽靜態(tài)的設(shè)置方法:
【第一步】
新建文件 web.config 將下列代碼復(fù)制進(jìn)入,之后將文件拷貝到網(wǎng)站根目錄
<?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>
【第二步】
設(shè)置-》固定鏈接-》自定義結(jié)構(gòu),就可以自定義鏈接了
同樣的,可以使用的參數(shù)是
可以使用的參數(shù)如下:
%year%:文章發(fā)表的年份,四位數(shù)字,如2016
%monthnum%:文章發(fā)表的月份,如03
%day%:文章發(fā)表的日期,如07
%hour%:文章發(fā)表的時(shí)間(小時(shí)),如10
%minute%:文章發(fā)表的時(shí)間(分鐘),如48
%second%:文章發(fā)表的時(shí)間(秒),如28
%postname%:文章別名,在發(fā)表文章時(shí)可以設(shè)置。
%post_id%:文章的ID,如86
%category%:分類別名,在添加分類時(shí)可以設(shè)置。
%tag%:標(biāo)簽的別名,在添加標(biāo)簽時(shí)可以設(shè)置。
會(huì)員登錄
賬號(hào)登錄還沒有賬號(hào)?立即注冊