1、只有TAG页面模式为 动态页面 时,才需要设置伪静态

2、设置步骤:

(1)在插件 参数设置 页面,设置好TAG伪静态规则

(2)根据伪静态规则,设置服务器的伪静态规则

TAG伪静态网址说明:

(1)支持三种标签,TAGID:[!–tagid–] TAG拼音:[!–tagpy–] 分页号:[!–page–]

(2)[!–tagpy–] 和 [!–tagid–] 不能同时使用

(3)以 tagid 为规则的网址,对应的网址是 e/tags/itag.php?tagid=[!–tagid–]&page=[!–page–]

(4)以 tagpy 为规则的网址,对应的网址是e/tags/itag.php?py=[!–tagpy–]&page=[!–page–]

分类伪静态网址说明:

(1)支持两种标签,TAG分类ID:[!–cid–] 分页号:[!–page–]

(2)对应的网址是 e/tags/itaglist.php?cid=[!–cid–]&page=[!–page–]

例子:

(1)一个网站的TAG网址伪静态规则设置如下:

TAG不含分页网址:/

TAG含有分页网址:/

分类不含分页网址:/

分类含有分页网址:/

(2)那么根据不同WEB服务器,服务器伪静态规则不同,如下:

.htaccess

RewriteEngine On

#tag拼音网址规则 (如果以tagid为网址,则将py改成tagid)
RewriteRule ^tag/([a-z0-9]+)_([0-9]+).ref="https://xwenw.com/tag/html" target="_blank">html$ e/tags/itag.php?py=$1&page=$2
RewriteRule ^tag/([a-z0-9]+).html$ e/tags/itag.php?py=$1

#tag分类网址规则
RewriteRule ^tag/list_([0-9]+)_([0-9]+)$ e/tags/itaglist.php?cid=$1&page=$2
RewriteRule ^tag/list_([0-9]+)$ e/tags/itaglist.php?cid=$1

Nginx

#tag拼音网址规则 (如果以tagid为网址,则将py改成tagid)
rewrite ^([^\.]*)/tag/([a-z0-9]+)_([0-9]+).html$ $1/e/tags/itag.php?py=$2&page=$3 last;
rewrite ^([^\.]*)/tag/([a-z0-9]+).html$ $1/e/tags/itag.php?py=$2 last;

#tag分类网址规则
rewrite ^([^\.]*)/tag/list_([0-9]+)_([0-9]+)$ $1/e/tags/itaglist.php?cid=$1&page=$2 last;
rewrite ^([^\.]*)/tag/list_([0-9]+)$ $1/e/tags/itaglist.php?cid=$1 last;

httpd.ini

[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32

#tag拼音网址规则 (如果以tagid为网址,则将py改成tagid)
RewriteRule ^tag/([a-z0-9]+)_([0-9]+).html$ e/tags/itag.php?py=$1&page=$2
RewriteRule ^tag/([a-z0-9]+).html$ e/tags/itag.php?py=$1

#tag分类网址规则
RewriteRule ^tag/list_([0-9]+)_([0-9]+)$ e/tags/itaglist.php?cid=$1&page=$2
RewriteRule ^tag/list_([0-9]+)$ e/tags/itaglist.php?cid=$1

web.config

<rules>
	<rule name="itagpage">
		<match url="^(.*/)*tag/([a-z0-9]+)_([0-9]+)\.html\?*(.*)$" />
		<action type="Rewrite" url="{R:1}/e/tags/itag.php\?py={R:2}&page={R:3}" />
	</rule>
	<rule name="itag">
		<match url="^(.*/)*tag/([a-z0-9]+)\.html\?*(.*)$" />
		<action type="Rewrite" url="{R:1}/e/tags/itag.php\?py={R:2}" />
	</rule>
	<rule name="listtagpage">
		<match url="^(.*/)*tag/list_([0-9]+)_([0-9]+)\?*(.*)$" />
		<action type="Rewrite" url="{R:1}/e/tags/itaglist.php\?cid={R:2}&page={R:3}" />
	</rule>
	<rule name="listtag">
		<match url="^(.*/)*tag/list_([0-9]+)\?*(.*)$" />
		<action type="Rewrite" url="{R:1}/e/tags/itaglist.php\?cid={R:2}" />
	</rule>
</rules>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。