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

 找回密碼
 立即註冊
快捷導航
  • 我愛av論壇BBS
  • 手機A片
  • 自拍偷拍外流區
  • 貼圖區
  • 52av裸聊室
  • 中文-中國主播
Yahoo!奇摩搜尋
熱搜: av4u論壇
Google搜尋
熱搜: av4u論壇
     
查看: 6062|回復: 0

[網頁伺服器] discuz x3.2的SEO設定

[複製鏈接]
發表於 2014-12-24 11:31:59 | 顯示全部樓層 |閱讀模式
本帖最後由 IT_man 於 2014-12-25 11:19 編輯
8 L  _! o0 i- j: r" R# O- Y) z5 ?: R. b; K% d, }
在此分為「Host server設定」Discuz 後台設定
% t) o$ h4 K. P( T8 \. ~4 q
Host server設定】    又分為Web server站台根目錄下的.htaccess% y/ Z6 @+ G  C' c, A
  
Web server
  • 檢查web server是否啟動 rewrite 模組    以Apache(其他如Nginx道理相同只是方法不同)為例,開啟/etc/httpd/conf/httpd.conf找到是否有這行  LoadModule rewrite_module modules/mod_rewrite.so有才可繼續下列動作
  • 加入Rewrite設定    於/etc/httpd/conf/httpd.conf加入你的網站目錄段如下:
    1. <Directory "/www/coav4u/test">" k; U* Z$ g8 x- ~5 E
    2. RewriteEngine On  # 將 RewriteEngine 模式打開
      - I0 q' N5 o6 |& R
    3. RewriteBase /        #設定為網站的根目錄
      5 l& D1 N0 X9 }  t" `2 `6 Z
    4. RewriteCond %{HTTP_HOST} ^av4u.info [NC]
      $ Z: Y; O, `8 @' @" }
    5. RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]                                                         
      * s3 N. I) k4 E) `* O6 a, V
    6. RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1
      ! Y! l) E! [& }! P
    7. RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1
      1 q9 j: `; C( t/ b! T) O
    8. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1, T2 m% U) a4 \: G9 ^
    9. RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%1
      " v0 p& _5 e( [8 t. L9 D9 v
    10. RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1
      ' b; a0 R6 Z( G' ^1 p
    11. RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1. j7 g; g& e, H, E* u7 C
    12. RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1
      3 s  d$ H* G  m& Q6 M- R& g) U! a
    13. RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1
      ) t2 e7 t" \/ n
    14. Options Includes FollowSymLinks
      % Q( v* f  ]# j; j
    15. AllowOverride All
      + R  }2 M; h# t. M6 M
    16. Allow from all' l" p; \' r( C- a+ K
    17. Order allow,deny
      , k3 z) N( |. S+ e  g2 p# d
    18. addDefaultCharset UTF-81 J4 t5 d) n5 B: G" |  }
    19. </Directory>
      7 A0 Z$ K  K3 x) A6 z
    複製代碼
  • 存檔後重啟httpd : service httpd restart 才會生效

    * {1 `% d# o" \) `& x  A( H
    註:有個地方須注意,/etc/httpd/conf/httpd.conf中<Directory "/www/coav4u/test"> 的 AllowOverride 一定要all,.htaccess才有作用
$ ~( w8 S- Y/ o" p. B

) q: i, z7 K. _3 |% z: E 站台根目錄下的.htaccess
  1. # -FrontPage-
    ' V2 P# N- j  E8 E9 T) B
  2. IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*  1 E# s. N. Q- g% t$ L4 `7 [+ R$ L
  3. # disable directory browsing
    3 S" M/ T* Z$ a
  4.   Options All -Indexes
    - i; w$ p9 J% P6 I7 e
  5. RewriteEngine On    # 將 RewriteEngine 模式打開8 e* K. ^: c1 J
  6. RewriteBase /    #設定為網站的根目錄
    3 D4 A+ K6 \9 U% K* s
  7. #- k6 ^. T2 g0 ~5 s
  8. RewriteCond %{HTTP_HOST} ^av4u.info [NC]
    " G. D/ N8 s! c7 D9 b
  9. RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]<font face="楷體,標楷體"><font size="3">RewriteRule ^topic-(.+)\.html$ portal.php?mod=topic&topic=$1&%1# l  x2 [1 {3 g$ n) y" _
  10. RewriteRule ^article-([0-9]+)-([0-9]+)\.html$ portal.php?mod=view&aid=$1&page=$2&%1" F# `3 W  n. y& Q6 Y
  11. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2&%1. M' R; L5 Y* g2 V  B$ q4 E8 N, ~
  12. RewriteRule; |1 i7 y( R& I9 I$ C* J$ i$ L
  13. ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$
    $ E1 |  z. ~- M9 z8 F
  14. forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2&%13 Z' _* d6 `" V  q/ |0 u) r
  15. RewriteRule ^group-([0-9]+)-([0-9]+)\.html$ forum.php?mod=group&fid=$1&page=$2&%1* g/ d( `7 }% \
  16. RewriteRule ^space-(username|uid)-(.+)\.html$ home.php?mod=space&$1=$2&%1
    4 D( {, f* \+ R' {, I& z
  17. RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$ home.php?mod=space&uid=$1&do=blog&id=$2&%1- A, N4 d7 O6 k. \" T6 a! B. F
  18. RewriteRule ^archiver/(fid|tid)-([0-9]+)\.html$ archiver/index.php?action=$1&value=$2&%1</font></font>
複製代碼
存檔後馬上生效
8 K  y7 m0 t2 C- I9 V. [  5 ~: P9 Q3 }9 [# n
Discuz 後台設定    後台->全局->SEO設置->URL靜態化
- B/ Y) j) E2 j7 M' Z: X: o 1.png . i  d7 P3 w; `" i9 j# S
可以全選或依據網站需要勾選
' W, b# f3 H+ Q5 g5 F7 i$ r
  t: z/ I9 V7 s+ {' G
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

本區塊內容依據『電腦網路內容分級處理辦法』為限制級網站,限定年滿18歲以上或達當地國家法定年齡人士方可進入,且願接受本站各項條款,未滿18歲 謝絕進入瀏覽。為防範未滿18歲之未成年網友瀏覽網路上限制級內容的圖文資訊,建議您可進行網路內容分級組織ICRA分級服務的安裝與設定。 (為還給愛護 本站的網友一個純淨的論壇環境,本站設有管理員)

QQ|小黑屋|手機板|52AV手機A片王

GMT+8, 2026-7-5 18:25 , Processed in 0.011433 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

連絡站長.廣告招商

[email protected] | Telegram:@asa00061     since 2015-01

快速回復 返回頂部 返回列表