52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-23 17:59:37 | 芰閰脖 撣 |摨閬 |梯璅∪
砍敺 IT_man 2014-12-24 18:42 蝺刻摩
, c# I; U! T0 Q' ]( S7 {1 S. d& d  ?$ i
望潭蝬脩閬,銝餉舐箔SEO(search engine optimize) in discuz x3.2 敺->典->SEO閮剔蔭->URL(閮剖摮),google鈭銝鈭鞈,憒銝:' J0 B. b9 Z; w( Y; z' ]4 D
隞蝝嫘# A2 {( j- e+ a' Q2 J9 t( s
URL Rewrite(URL撠)臭蝔娜EST (Representational State Transfer嚗銵典噩頧蝘)賊銵嚗摰臭誑 Web Server 銝哨撠雿輻刻靘 URL 脰頧敺嚗喳 Web Server 銝剔蝔撘具
, Q; ~! M, n7 F0 j6 u0 W1 p! D雿輻刻臭誑雿輻刻渲死孵靘頛詨 URL嚗銋 REST 銝餉桃嚗嚗舀撠撘雿喳嚗SEO嚗雿瘜銋銝函撘潸臭誑拍券璈嗡撠賊梯韏瑚嚗舫踹霈蝬脰楝銝⊥雿輻刻園唳拇潛澆餅鞈閮
; [6 ?# b8 N7 @* Q/ o

* }5 _3 F9 X8 d1 z雿輻沖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$ e0 C  Q; b( T
ReWrite臭誑甇閬銵函內撘靘銵券,潭迤閬銵函內撘隤瘜隢6 p- R! G% d# q  E
雿輻 ReWrite 憟質鈭:
. D' S; o) }$ K* L
I.霈 URL 韏瑚瘥頛哨銝撣嗅貊 'URL' 敶W撠雿輻刻靘隤芣頛蝧嚗! T  i( B  |9 t  q; |  G: s5 P' j
II.拇 SEO嚗撠撘瘥頛憟賣
. k6 [, Q2 H  g- J$ Q0 ~Rewrite隤瘜) Q" Q) C, t1 x- h9 y% ^8 @
隞乩摮1隤芣:
  1. RewriteEngine on2 q3 U0 F& I$ w2 Z2 {  V
  2. RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5.0.*
    2 ~; o  e& i; J8 V. F# ]) @  y+ U
  3. RewriteRule index.php index.m.php
    7 s4 u2 f3 I* A8 d: ]* V
  4. RewriteCond %{HTTP_USER_AGENT} ^Lynx.*( y/ Q$ J4 \% T& k9 c0 d! S+ L0 s* V6 u" C
  5. RewriteRule index.php index.L.php  [( A# Q# Z  y
  6. RewriteRule index.php index.b.php) D2 e' h; u$ j
銴鋆賭誨蝣
隤蝑:
0 p; ~( Q& B' |2 D& }; I
  1. if($_SERVER['HTTP_USER_AGENT'] == 'Mozilla/5.0) //FireFox閬賢
    . A2 B: K. U+ j
  2. {
    2 \% g9 ]8 k; V% F2 n8 [
  3. //頧迺ndex.m.php
    * g0 k0 z; {/ F4 ~- @- n$ S
  4. }: M3 t/ L; J& {! u& r+ E2 S, j
  5. else if($_SERVER['HTTP_USER_AGENT'] == 'Lynx') //蝘餃閮剖閬賢. i% g& ]" }& w( z$ F
  6. {3 U) @! \3 o0 i
  7. //頧迺ndex.L.php
    $ `! K: Y, ^8 p! y/ A* G9 ]
  8. }
    5 \5 B; n. o" T# x! d' T3 B; v/ E
  9. else  //嗡祉閬賢
    $ T% N6 @# @1 @4 v) \) j
  10. //頧迺ndex.b.php
銴鋆賭誨蝣
靘摮2.
) ^, {6 O5 D7 O. Q, q
  1. RewriteCond %{REMOTE_HOST} ^host1.* [OR]
    $ e) w& U$ T7 j0 X: m( n- E
  2. RewriteCond %{REMOTE_HOST} ^host2.* [OR]! ^# o2 \( Z1 e4 ?
  3. RewriteCond %{REMOTE_HOST} ^host3.*# z0 u* c+ j' U
  4. RewriteRule (.*)$ test.php
銴鋆賭誨蝣
憒啣疲ost1host2host3嚗撠梯頝喳啣test.php* h+ h2 j) E, j. G8 r+ M
敺鋆∪臭誑綽RewriteCond隤乩批頛舀涉ND,憒唾OR,閬蝣箇撖怠箔
8 v3 W8 M$ v8 o( ~1 i隞乩隞蝝鄗eWrite隤瘜:

4 K# v* f8 h' ^4 o% h5 c1 j$ ERewriteCond TestString CondPattern [Flags]
+ h, \6 n: a& ?TestString  舀銝URL澆璇隞塚靘摮銝剔函舐啣霈詨蝔寄TTP_HOST怎批捆嚗Name= Value嚗嚗臭map嚗萄澆嚗澆鞈憿
# P3 V, v" t, a& P* c$ LCondPattern 舀隞嗅賂隞亦洵鈭靘摮箔嚗撠望
host1.*6 N2 \# l9 I5 D" I1 `
Flags       璅霅舐洵銝賂臭誑其蝺頝銝銝璇隞塚汰R銵函內嚗憒瘝[Flags]嚗券勗怎AND嚗銵函內
銝虫
2 W  A9 d, d/ F+ t% R嗅臭誑
NC蝑蝑嚗銵函內敹賜亙之撠撖RewriteCond撠勗蝔撘銝剔if隤乩璅嚗銵函內憒蝚血撟曉璇隞嗅瑁RewriteCond銝Y啁RewriteRule隤伐撠望爹ewriteCond憪箇2 x4 b; e3 I2 Q$ w
' w4 k: E  W0 b3 B& {
Flags 游冽:
. U, O* u7 v5 H( k# b
I (ignore case嚗銝蝞∪之撠撖怠撥銵摰摮銝脣寥嚗FLAG敶梢燎ewriteRule隞文豢RewriteCond 隞5 ]* ]5 @( C# a' z1 M# D
F (Forbidden) 撠摰X嗥垢嚗甇㎞EWRITING蝔摨銝虫403航炊嚗瘜冽券蝔格瘜銝FORMATSTRING 舐∠函銝血臭誑閮剔蔭箔遙雿蝛箏銝脯
+ [0 Y% {4 [1 [5 K! I$ q: iL (last rule) 銝其遙雿撖怨
冽迨甇a撖怎摨嚗雿輻券FLAG隞仿餅迫嗅鋡恍撖怎URI鋡怠Y閬甈⊿撖( Q) R8 A, y0 b/ Q+ {# }6 b! I6 x
N (Next iteration) 撘瑕買EWRITINGENGINE隤踵渲格銝虫敺剝閬瑼X伐靽格孵靽摮嚗嚗甈⊥貊崇epeatLimit摰潮塚憒詨潸N FLAG撠鋡怠蕭/ b( t* g2 `+ I
NS (Next iteration of the same rule) 隞代璅閮撌乩銝敺詨閬閬蝔摨嚗靘憒撘瑕園銴閬剁嚗RepeatLimit隞斗摰銝銴瑁銝閬憭扳貊殷
5 [# b. C* b  F, f$ aP (force proxy) 撘瑕嗥桃URI典折典撥嗥箔誨瘙銝虫蝡喲ISAPI游隞隞瘙嚗敹蝣箄隞摮銝脫臭URI砍霅唬蜓璈蝑蝑血隞撠餈航炊
+ [" C; P7 a( d$ OR (explicit redirect嚗撘瑕嗆典摰X嗥垢澆粹摰蝷箏單蝑嚗靘桃URI啣啣嚗摰閬蝬撣豢舀敺閬
: g, a: K# z* f& b0 R( SRP (permanent redirect) 撟曆[R]璅閮詨雿舐澆301HTTP銝302HTTP隞蝣0 q0 `, `+ u4 Z- E1 s6 T) `; {
U (Unmangle Log) 貸RI臭皞瘙銝舫撖恍瘙閮頛URI
% e  s) `4 p0 y4 R- W9 P6 yO (nOrmalize) 典祕銵銋璅皞摮銝脯璅皞柿RL-ENCODING嚗銝瘜摮銝脩蝘餃蝑嚗璅閮撠墀RLSURLS-ENDODED剜舀函7 o# o/ q- v) l5 T* o. I( B
CL (Case Lower) 撠撖
5 q! ~# b3 P% ^& E; S; \CU (Case Upper) 憭批神

' R# H$ k; b9 ^5 ?  \暺靘鈭,閬憒雿閮剖賢祕曆餈啁,隞乩舀靘摮(.htaccess apachehttpd.conf拍冽迤閬銵函內撘):( O: B9 s5 [* G4 r( k
  • .htaccess    甇斗暹潛雯蝡寧桅
    1. # -FrontPage-
      . t$ t9 c: v, L5 J! z
    2. IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
      % [( [( `  V+ I. t
    3. # disable directory browsing! o3 e  A! M1 |/ c# }
    4. Options All -Indexes- m/ ~2 G1 X; V$ J
    5. RewriteEngine On    # 撠 RewriteEngine 璅∪
      " F; O- Q% u8 L4 J/ w
    6. RewriteBase /    #閮剖箇雯蝡寧桅
      % M3 X5 W, t4 B# z# {
    7. #4 v" Z% ~( [' x6 Q/ H6 E8 k( {
    8. RewriteCond %{HTTP_HOST} ^av4u.info [NC]6 s- S! |+ ?2 ?4 B8 V  D# f0 H, `/ J" ?( y
    9. RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]
      ; G9 K& A$ B2 S, j4 V
    10. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2
      0 P/ M% p% q4 I
    11. RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2
      / Q- P: g: k  `! w
    銴鋆賭誨蝣
      w2 s# y+ C5 n$ T
  • Apache銋httpd.conf    /etc/httpd/conf/httpd.conf銝血乩蝬脩桅畾萄銝:
    1. <Directory "/www/coav4u/test">0 {( Z/ C; a4 C% Z
    2.         RewriteEngine On  # 撠 RewriteEngine 璅∪
      + k- b& W4 M) e* r
    3.         RewriteBase /        #閮剖箇雯蝡寧桅
      9 S: F0 z" K2 M- J4 ]  Q
    4.         RewriteCond %{HTTP_HOST} ^av4u.info [NC]
      2 ~* ~5 o: v- X
    5.         RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]9 s- H( F; u, }# |& _; O
    6.         RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2, o( N8 V1 U. t3 E/ V8 I
    7.         RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2
      . S6 U3 M9 w% Z
    8.         Options Includes FollowSymLinks4 X6 |% A! T! u4 M0 @+ e
    9.         AllowOverride All  w, |6 l+ F; J/ E( E
    10.         Allow from all
      ; H2 I7 _2 Q5 L$ l" s
    11.         Order allow,deny5 s5 t% _9 {( l/ k- n3 L: `$ U
    12.         addDefaultCharset UTF-87 |5 I3 s  j5 q8 C. k0 {
    13. </Directory>+ U3 P* R5 W8 M- |. [* {0 y, D' b
    銴鋆賭誨蝣
    摮瑼敺閮敺httpd : service httpd restart + k6 |8 D  A5 T

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-21 23:22 , Processed in 0.068632 second(s), 16 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵