52AV璈A|52AV.ONE

 曉撖蝣
 蝡唾酉
敹急瑕
  • av隢憯BBS
  • 璈A
  • 芣瑟憭瘚
  • 鞎澆
  • 52av鋆貉摰
  • 銝剜-銝剖銝餅
Yahoo!憟拇撠
望: 璈A
Google憟拇撠
望: 璈A
     
亦: 4715|敺: 0
銝銝銝駁 銝銝銝駁

[蝬脤隡箸沘 [SEO] ReWrite 閮剖霈 URL 璅撘霈璅撘(瑁)

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-23 17:59:37 | 芰閰脖 撣 |摨閬 |梯璅∪
砍敺 IT_man 2014-12-24 18:42 蝺刻摩 / T. h+ b3 S7 w9 E

# {) t! s! ^% t; E' O望潭蝬脩閬,銝餉舐箔SEO(search engine optimize) in discuz x3.2 敺->典->SEO閮剔蔭->URL(閮剖摮),google鈭銝鈭鞈,憒銝:
* _1 Q# V. L$ A8 q: F隞蝝嫘
! [' w9 j# Z+ _: a
URL Rewrite(URL撠)臭蝔娜EST (Representational State Transfer嚗銵典噩頧蝘)賊銵嚗摰臭誑 Web Server 銝哨撠雿輻刻靘 URL 脰頧敺嚗喳 Web Server 銝剔蝔撘具- ^, G" }8 \) u, [
雿輻刻臭誑雿輻刻渲死孵靘頛詨 URL嚗銋 REST 銝餉桃嚗嚗舀撠撘雿喳嚗SEO嚗雿瘜銋銝函撘潸臭誑拍券璈嗡撠賊梯韏瑚嚗舫踹霈蝬脰楝銝⊥雿輻刻園唳拇潛澆餅鞈閮
; E2 E; ?& X) D  p
( K1 B" |- Z* H$ H% @. a( V4 r
雿輻沖eWrite 閮剖嚗敺嫣噶啣臬祆胯
http://www.av4u.info/forum.php?mod=viewthread&tid=192&extra=page%3D1璅撘URL嚗霈http://www.av4u.info/thread-192-1-1.html敶W 'URL
7 }% H( Z# ~* k- X. ^  LReWrite臭誑甇閬銵函內撘靘銵券,潭迤閬銵函內撘隤瘜隢$ c$ `8 ]; I4 Y
雿輻 ReWrite 憟質鈭:

( E: J! p: x0 u4 {8 Z* xI.霈 URL 韏瑚瘥頛哨銝撣嗅貊 'URL' 敶W撠雿輻刻靘隤芣頛蝧嚗! p& G0 h" k& a, y/ P
II.拇 SEO嚗撠撘瘥頛憟賣
, H9 E% U  i, x7 ]  |7 ?2 l/ e" PRewrite隤瘜
" ?' _7 p- j3 `; i$ |  k1 S隞乩摮1隤芣:
  1. RewriteEngine on: j  T: P1 [+ I) Y- N( K" y* t  |1 \$ X
  2. RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5.0.** v7 U; @5 B$ H. t# Q; R" y
  3. RewriteRule index.php index.m.php
    . D5 K3 i" _$ J3 B( K
  4. RewriteCond %{HTTP_USER_AGENT} ^Lynx.*
    , T, Z1 i( V; _0 Y, ~5 X
  5. RewriteRule index.php index.L.php5 H+ |, I. C8 p* g
  6. RewriteRule index.php index.b.php
    % o$ x- _$ ?6 p) N/ W
銴鋆賭誨蝣
隤蝑:7 U; f# r. _+ e
  1. if($_SERVER['HTTP_USER_AGENT'] == 'Mozilla/5.0) //FireFox閬賢
    8 h! w+ {- d0 M% U$ |
  2. {, A- a( l! a9 T% M1 w2 G* k* @
  3. //頧迺ndex.m.php
    ' a3 i1 o9 z/ F
  4. }2 S. s* J* M+ x" M* \' U5 N* W: U+ v
  5. else if($_SERVER['HTTP_USER_AGENT'] == 'Lynx') //蝘餃閮剖閬賢
    9 B; ?) r4 ]+ H) n8 w
  6. {4 M! i/ H7 H! W# A2 G: |
  7. //頧迺ndex.L.php$ x' G' }4 A; i7 |0 P
  8. }
      R& i$ u1 S& J( m
  9. else  //嗡祉閬賢7 ^9 p" ]9 H; o; A( r; l
  10. //頧迺ndex.b.php
銴鋆賭誨蝣
靘摮2.
% Q: F/ \2 @: w2 r$ _
  1. RewriteCond %{REMOTE_HOST} ^host1.* [OR]7 f( \  T- l; p3 L' l- j/ a" y5 |% @: B
  2. RewriteCond %{REMOTE_HOST} ^host2.* [OR]
    ! T9 B% i5 i( H. [& x7 x4 i; g: [
  3. RewriteCond %{REMOTE_HOST} ^host3.*; Y; q3 z7 y0 d* @# O2 H: r
  4. RewriteRule (.*)$ test.php
銴鋆賭誨蝣
憒啣疲ost1host2host3嚗撠梯頝喳啣test.php
6 Z0 c" o* M& b( p8 K敺鋆∪臭誑綽RewriteCond隤乩批頛舀涉ND,憒唾OR,閬蝣箇撖怠箔- K! `; [1 m1 g: F( H2 n
隞乩隞蝝鄗eWrite隤瘜:

4 o" [& _6 O5 |& o2 A; T4 j3 ]RewriteCond TestString CondPattern [Flags]
4 [" h8 E, i; w6 X  Q. ATestString  舀銝URL澆璇隞塚靘摮銝剔函舐啣霈詨蝔寄TTP_HOST怎批捆嚗Name= Value嚗嚗臭map嚗萄澆嚗澆鞈憿0 P( ]2 J$ H& @
CondPattern 舀隞嗅賂隞亦洵鈭靘摮箔嚗撠望
host1.*  N+ B0 W4 r  H  w" V3 O
Flags       璅霅舐洵銝賂臭誑其蝺頝銝銝璇隞塚汰R銵函內嚗憒瘝[Flags]嚗券勗怎AND嚗銵函內
銝虫
+ f3 i3 e+ r9 E/ t# g# h9 T9 r嗅臭誑
NC蝑蝑嚗銵函內敹賜亙之撠撖RewriteCond撠勗蝔撘銝剔if隤乩璅嚗銵函內憒蝚血撟曉璇隞嗅瑁RewriteCond銝Y啁RewriteRule隤伐撠望爹ewriteCond憪箇
' p( `4 u/ [7 p/ B8 Z. `% T
+ g5 j- R' b$ E0 z8 l- P6 S
Flags 游冽:1 @6 q$ i$ T% o7 X2 d
I (ignore case嚗銝蝞∪之撠撖怠撥銵摰摮銝脣寥嚗FLAG敶梢燎ewriteRule隞文豢RewriteCond 隞& u# n. H  f5 E* `/ a" u
F (Forbidden) 撠摰X嗥垢嚗甇㎞EWRITING蝔摨銝虫403航炊嚗瘜冽券蝔格瘜銝FORMATSTRING 舐∠函銝血臭誑閮剔蔭箔遙雿蝛箏銝脯2 ~! c5 T5 |8 t! K
L (last rule) 銝其遙雿撖怨
冽迨甇a撖怎摨嚗雿輻券FLAG隞仿餅迫嗅鋡恍撖怎URI鋡怠Y閬甈⊿撖
0 ?! k; B& [0 _) \: jN (Next iteration) 撘瑕買EWRITINGENGINE隤踵渲格銝虫敺剝閬瑼X伐靽格孵靽摮嚗嚗甈⊥貊崇epeatLimit摰潮塚憒詨潸N FLAG撠鋡怠蕭
5 x( f* _% i* ~+ t7 sNS (Next iteration of the same rule) 隞代璅閮撌乩銝敺詨閬閬蝔摨嚗靘憒撘瑕園銴閬剁嚗RepeatLimit隞斗摰銝銴瑁銝閬憭扳貊殷( v  z$ q, |, i) ~; i- ^
P (force proxy) 撘瑕嗥桃URI典折典撥嗥箔誨瘙銝虫蝡喲ISAPI游隞隞瘙嚗敹蝣箄隞摮銝脫臭URI砍霅唬蜓璈蝑蝑血隞撠餈航炊
% s% `5 H" |; HR (explicit redirect嚗撘瑕嗆典摰X嗥垢澆粹摰蝷箏單蝑嚗靘桃URI啣啣嚗摰閬蝬撣豢舀敺閬% f% v9 H0 ]4 U0 K( k8 g. Z
RP (permanent redirect) 撟曆[R]璅閮詨雿舐澆301HTTP銝302HTTP隞蝣( E7 D2 T! r* G) `! t
U (Unmangle Log) 貸RI臭皞瘙銝舫撖恍瘙閮頛URI
% M4 v' m4 F; mO (nOrmalize) 典祕銵銋璅皞摮銝脯璅皞柿RL-ENCODING嚗銝瘜摮銝脩蝘餃蝑嚗璅閮撠墀RLSURLS-ENDODED剜舀函$ D: I) R( ]7 F) E& L
CL (Case Lower) 撠撖: n1 l5 R4 Y: i. z6 S
CU (Case Upper) 憭批神
9 A5 y+ b) V0 b: q2 L! n
暺靘鈭,閬憒雿閮剖賢祕曆餈啁,隞乩舀靘摮(.htaccess apachehttpd.conf拍冽迤閬銵函內撘):
2 e5 {" Z+ K. h; X
  • .htaccess    甇斗暹潛雯蝡寧桅
    1. # -FrontPage-& I& W* R5 e* ^3 ]1 W
    2. IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
      * k# S/ \6 E1 w8 \
    3. # disable directory browsing9 h, G% l& f# K0 {8 f
    4. Options All -Indexes
      - q" F8 x+ j9 L, k& u
    5. RewriteEngine On    # 撠 RewriteEngine 璅∪5 K( o( Q8 c; Z6 z/ v+ ?# e
    6. RewriteBase /    #閮剖箇雯蝡寧桅
      ! R: X7 Q4 v" l+ t0 ~0 J# S
    7. #- n% |3 r( s  `  V
    8. RewriteCond %{HTTP_HOST} ^av4u.info [NC]- }9 X1 f3 ~1 p8 i. T5 n! e% I
    9. RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]
      # m( e0 p! \5 i( h4 q' K
    10. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2$ m) p$ ~( U; C6 E+ j+ q
    11. RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2' J' ?0 N: N6 C& [, y3 t
    銴鋆賭誨蝣

    2 w' _% H! c5 N) S: Q7 ~7 e
  • Apache銋httpd.conf    /etc/httpd/conf/httpd.conf銝血乩蝬脩桅畾萄銝:
    1. <Directory "/www/coav4u/test">7 g9 A# O- s/ H% F: P  n
    2.         RewriteEngine On  # 撠 RewriteEngine 璅∪9 [, D% b* y9 J' H& i  y
    3.         RewriteBase /        #閮剖箇雯蝡寧桅2 _( |* e3 O" v" P8 \% a
    4.         RewriteCond %{HTTP_HOST} ^av4u.info [NC]
      0 m6 o& R, u, m: j+ t% d! R! P- W
    5.         RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]
        g) H' r3 H6 j3 g5 t
    6.         RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2% U2 a; a3 H, A6 ?3 I8 q8 L
    7.         RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2
      $ G. c7 o6 `! E0 D0 `" Q4 ^1 u
    8.         Options Includes FollowSymLinks- C2 W% s* d0 h( o: s) I- L
    9.         AllowOverride All1 L1 [% J) |2 f  `; ?* [
    10.         Allow from all' r4 M! b0 ]/ `/ \
    11.         Order allow,deny( ~- z; b5 M/ Q) Z4 ^5 ]
    12.         addDefaultCharset UTF-8
        w/ B7 V3 u- B4 B) y3 a
    13. </Directory>
      2 a; q; J$ s5 I( O& Z
    銴鋆賭誨蝣
    摮瑼敺閮敺httpd : service httpd restart
    # X# C3 e" S# J

雿輻券

祉蝛閬

BT蝳

砍憛批捆靘餉衣雯頝臬批捆蝝颲行粹嗥蝬脩嚗摰撟湔遛嚗嚗甇脖誑銝嗅啣摰嗆摰撟湧翩鈭箏ㄚ孵舫脣伐銝憿亙祉璇甈橘芣遛18甇 雓蝯脣亦閬賬粹脩芣遛18甇脖芣撟渡雯閬賜雯頝臭嗥批捆鞈閮嚗撱箄降典舫脰蝬脰楝批捆蝝蝯蝜ICRA蝝摰鋆閮剖 (粹蝯行霅 祉蝬脣銝蝝瘛函隢憯啣嚗祉閮剜蝞∠)

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-24 11:04 , Processed in 0.066070 second(s), 16 queries .

蝯∠.撱

52avtv@gmail.com | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵