97久久国产亚洲精品超碰热,成人又色又爽的免费网站,色偷偷女人的天堂a,男女高潮喷水在线观看,国内精品一线二线三线区别在哪里

Discuz! 官方交流社區(qū)

標題: 別花冤枉錢買了!幾分鐘實現(xiàn)TAG偽靜態(tài)并開放搜索引擎收錄 [打印本頁]

作者: gzwnzss    時間: 2021-2-4 11:56
標題: 別花冤枉錢買了!幾分鐘實現(xiàn)TAG偽靜態(tài)并開放搜索引擎收錄
本帖最后由 gzwnzss 于 2021-2-7 21:03 編輯

記錄下方法,X3系列版本應該都能適用。
需求:
misc.php?mod=tag >>> /tag/
misc.php?mod=tag&id=47 >>> /tag/47.html

修改步驟:

1、增加偽靜態(tài)規(guī)則
Nginx Web Server:
  1. rewrite ^/tag/(.+).html$ /misc.php?mod=tag&id=$1;
復制代碼
IIS Web Server:
  1. RewriteCond %{QUERY_STRING} ^(.*)$
  2. RewriteRule ^tag/(.+)\.html$ misc.php?mod=tag&id=$1
  3. RewriteCond %{QUERY_STRING} ^(.*)
  4. RewriteRule ^tag/\$ misc.php?mod=tag
復制代碼
Apache Web Server:
  1. RewriteRule ^(.*)/tag/(.+)\.html*$ $1/misc.php\?mod=tag&id=$2
  2. RewriteRule ^(.*)/tag/\*$ $1/misc.php\?mod=tag
復制代碼
2、修改相關模板鏈接

3、允許搜索引擎抓取tab(DZ默認是禁止的)
打開根目錄下robort.txt,找并刪除下面兩行:
  1. Disallow: /misc.php
復制代碼
再打開根目錄下misc.php文件,
查找:
  1. $Discuz->reject_robot();
復制代碼
注釋或刪除即可。

作者: hakiss    時間: 2021-2-6 15:19
學習了,開源免費最優(yōu)美




歡迎光臨 Discuz! 官方交流社區(qū) (http://r615.cn/) Powered by Discuz! X5.0