男的舔女的下面视频在线播放-少妇愉情理仑片高潮日本-久久久久久国产一区二区三区-麻豆精品一区二区综合-国产精品超碰在线观看-网红极品女神精品视频在线-国产亚洲综合777-高清性视频一区二区播放-中文字幕第一页亚洲天堂
Discuz! 官方交流社區(qū)
標(biāo)題:
別花冤枉錢(qián)買(mǎi)了!幾分鐘實(shí)現(xiàn)TAG偽靜態(tài)并開(kāi)放搜索引擎收錄
[打印本頁(yè)]
作者:
gzwnzss
時(shí)間:
2021-2-4 11:56
標(biāo)題:
別花冤枉錢(qián)買(mǎi)了!幾分鐘實(shí)現(xiàn)TAG偽靜態(tài)并開(kāi)放搜索引擎收錄
本帖最后由 gzwnzss 于 2021-2-7 21:03 編輯
記錄下方法,X3系列版本應(yīng)該都能適用。
需求:
misc.php?mod=tag >>> /tag/
misc.php?mod=tag&id=47 >>> /tag/47.html
修改步驟:
1、增加偽靜態(tài)規(guī)則
Nginx Web Server:
rewrite ^/tag/(.+).html$ /misc.php?mod=tag&id=$1;
復(fù)制代碼
IIS Web Server:
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tag/(.+)\.html$ misc.php?mod=tag&id=$1
RewriteCond %{QUERY_STRING} ^(.*)
RewriteRule ^tag/\$ misc.php?mod=tag
復(fù)制代碼
Apache Web Server:
RewriteRule ^(.*)/tag/(.+)\.html*$ $1/misc.php\?mod=tag&id=$2
RewriteRule ^(.*)/tag/\*$ $1/misc.php\?mod=tag
復(fù)制代碼
2、修改相關(guān)模板鏈接
3、允許搜索引擎抓取tab(DZ默認(rèn)是禁止的)
打開(kāi)根目錄下robort.txt,找并刪除下面兩行:
Disallow: /misc.php
復(fù)制代碼
再打開(kāi)根目錄下misc.php文件,
查找:
$Discuz->reject_robot();
復(fù)制代碼
注釋或刪除即可。
作者:
hakiss
時(shí)間:
2021-2-6 15:19
學(xué)習(xí)了,開(kāi)源免費(fèi)最優(yōu)美
歡迎光臨 Discuz! 官方交流社區(qū) (http://m.sdtechgong.com.cn/)
Powered by Discuz! X5.0