52AV手機A片王|52AV.ONE

標題: discuz x3.2的SEO設定 [打印本頁]

作者: IT_man    時間: 2014-12-24 11:31
標題: discuz x3.2的SEO設定
本帖最後由 IT_man 於 2014-12-25 11:19 編輯 : z9 w+ s0 @6 f# ]# g
. Q& l2 j; z0 D0 i  E
在此分為「Host server設定」Discuz 後台設定
2 T8 j$ D+ s( U; Q& r! W/ e
Host server設定】    又分為Web server站台根目錄下的.htaccess
! O# i, d% B6 p; D: d
  
Web server    註:有個地方須注意,/etc/httpd/conf/httpd.conf中<Directory "/www/coav4u/test"> 的 AllowOverride 一定要all,.htaccess才有作用
( R6 s! N0 o; \3 `8 H* e

- v( f0 r, }8 w4 o% a% j 站台根目錄下的.htaccess
  1. # -FrontPage-: d3 @/ Z% L4 l, H
  2. IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*  
    % I+ r3 z$ g$ n# G1 t% k
  3. # disable directory browsing2 i5 R( O% R& x; Z) g* n+ O: z
  4.   Options All -Indexes  W, D( |. [) I& {9 m
  5. RewriteEngine On    # 將 RewriteEngine 模式打開" h: P8 Z, X( B( q% ]
  6. RewriteBase /    #設定為網站的根目錄
    ; `% a/ s7 Q5 }$ ?3 Y' d0 m; O' K
  7. #
    " r& d! F0 B( U
  8. RewriteCond %{HTTP_HOST} ^av4u.info [NC]: p% N6 U; O" d4 V5 _- ?* |8 s
  9. RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]<font face="楷體,標楷體"><font size="3">RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1+ Z$ c: P/ H: ~; V4 H+ S
  10. RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1. n% K$ X% M" `5 Z  \, q. `) W' U9 D
  11. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1
    + l0 ]) w/ ~) K$ a3 m
  12. RewriteRule
    - h4 T" H: s5 H0 _7 G1 {
  13. ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ 3 W; y; p6 ~# k; d0 o
  14. forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1) ?4 q5 q* l+ L9 c7 }2 w
  15. RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
    & {8 s& ]% G1 p6 l  q* }7 _$ q
  16. RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1) G2 h7 b4 _  P8 d2 T  }
  17. RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%18 `/ H+ V% V# z' ~
  18. RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1</font></font>
複製代碼
存檔後馬上生效
* y7 f5 [' [) [' L  I# d  . w. c& H1 h: o% a/ U3 ^
Discuz 後台設定    後台->全局->SEO設置->URL靜態化. L, x5 Z% }: t: `" l% P

7 ^) B& j8 }$ e4 }
可以全選或依據網站需要勾選( n8 y% L$ q# ~1 y$ t
# X: v5 `: E8 G2 k- h





歡迎光臨 52AV手機A片王|52AV.ONE (https://www.52av23.xyz/) Powered by Discuz! X3.2