52AV璈A|52AV.ONE

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

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

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-23 17:59:37 | 芰閰脖 撣 |甇摨閬 |梯璅∪
砍敺 IT_man 2014-12-24 18:42 蝺刻摩
$ c( R% \9 z7 N
5 R, h- n  U/ |! z3 n9 l望潭蝬脩閬,銝餉舐箔SEO(search engine optimize) in discuz x3.2 敺->典->SEO閮剔蔭->URL(閮剖摮),google鈭銝鈭鞈,憒銝:; z7 ?: C* K: f
隞蝝嫘
: S$ N9 v2 ]3 g; l- }. D
URL Rewrite(URL撠)臭蝔娜EST (Representational State Transfer嚗銵典噩頧蝘)賊銵嚗摰臭誑 Web Server 銝哨撠雿輻刻靘 URL 脰頧敺嚗喳 Web Server 銝剔蝔撘具6 d4 f* V" }' [. Z+ a" P
雿輻刻臭誑雿輻刻渲死孵靘頛詨 URL嚗銋 REST 銝餉桃嚗嚗舀撠撘雿喳嚗SEO嚗雿瘜銋銝函撘潸臭誑拍券璈嗡撠賊梯韏瑚嚗舫踹霈蝬脰楝銝⊥雿輻刻園唳拇潛澆餅鞈閮
& v, \% T8 U1 m) I

! \7 N" ?5 f/ \; c1 K4 D7 @6 v" E/ i雿輻沖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
1 g8 T. J, H0 m1 I% j6 I" lReWrite臭誑甇閬銵函內撘靘銵券,潭迤閬銵函內撘隤瘜隢
& @! x# e3 ~& E" T' H雿輻 ReWrite 憟質鈭:

# m' H+ O# R+ _% r4 wI.霈 URL 韏瑚瘥頛哨銝撣嗅貊 'URL' 敶W撠雿輻刻靘隤芣頛蝧嚗
8 D2 _* Z9 M" q+ g. E3 g" YII.拇 SEO嚗撠撘瘥頛憟賣# _8 T1 S/ ]5 v( c
Rewrite隤瘜
1 @: I: K2 e# a9 }0 V- V隞乩摮1隤芣:
  1. RewriteEngine on* m- t; y# b4 M' |# a& r
  2. RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5.0.*" E: k% I: p; s1 p- W# U
  3. RewriteRule index.php index.m.php
    0 T9 U+ r* l' {
  4. RewriteCond %{HTTP_USER_AGENT} ^Lynx.*! p* R. @9 p. }! w5 R3 h1 o
  5. RewriteRule index.php index.L.php1 i& t0 T$ }# p
  6. RewriteRule index.php index.b.php
    * t% s( v% {9 I
銴鋆賭誨蝣
隤蝑:
' a  Z4 _& t" P5 O
  1. if($_SERVER['HTTP_USER_AGENT'] == 'Mozilla/5.0) //FireFox閬賢( i9 b& t9 t8 W8 @. ~1 S& E  ^
  2. {, d5 _3 `9 w8 z/ N
  3. //頧迺ndex.m.php, u0 u0 n# d2 G( z: K
  4. }) \8 l% w6 c- q* s- ?8 @
  5. else if($_SERVER['HTTP_USER_AGENT'] == 'Lynx') //蝘餃閮剖閬賢
      o2 l& P( M9 m* s& g
  6. {6 x1 r1 j7 w! ~# B
  7. //頧迺ndex.L.php. [& j6 r" {) m# _6 q# r) D
  8. }! Y0 ~4 n5 F8 u- I0 o
  9. else  //嗡祉閬賢
    , d7 F. L) i- \- G( F( h3 d' N
  10. //頧迺ndex.b.php
銴鋆賭誨蝣
靘摮2.
" _5 k3 A# R' c% a& ^: ?: R. J
  1. RewriteCond %{REMOTE_HOST} ^host1.* [OR]8 W7 o* B) u' y8 P) X& B; J; b4 a
  2. RewriteCond %{REMOTE_HOST} ^host2.* [OR]
    # a5 x" X8 w* c  j/ ]
  3. RewriteCond %{REMOTE_HOST} ^host3.*
    2 v% n# b4 v4 j- ^* _( l6 z
  4. RewriteRule (.*)$ test.php
銴鋆賭誨蝣
憒啣疲ost1host2host3嚗撠梯頝喳啣test.php* _+ O6 D  a2 T' w8 m4 @. k; z; y
敺鋆∪臭誑綽RewriteCond隤乩批頛舀涉ND,憒唾OR,閬蝣箇撖怠箔7 O$ M/ _3 {% v( U5 u, ]9 i3 Y
隞乩隞蝝鄗eWrite隤瘜:
$ H2 R) x2 E  S$ u
RewriteCond TestString CondPattern [Flags]' R: m' I( p$ C
TestString  舀銝URL澆璇隞塚靘摮銝剔函舐啣霈詨蝔寄TTP_HOST怎批捆嚗Name= Value嚗嚗臭map嚗萄澆嚗澆鞈憿
% p7 J- j# F7 l; t; A$ x% jCondPattern 舀隞嗅賂隞亦洵鈭靘摮箔嚗撠望
host1.*
5 M* K8 }" c' u% FFlags       璅霅舐洵銝賂臭誑其蝺頝銝銝璇隞塚汰R銵函內嚗憒瘝[Flags]嚗券勗怎AND嚗銵函內
銝虫3 y3 [2 w5 C% t: _& D; _
嗅臭誑
NC蝑蝑嚗銵函內敹賜亙之撠撖RewriteCond撠勗蝔撘銝剔if隤乩璅嚗銵函內憒蝚血撟曉璇隞嗅瑁RewriteCond銝Y啁RewriteRule隤伐撠望爹ewriteCond憪箇
  J  j, ~- C2 x3 m9 h2 Y( Y+ e( H

6 E- E% h. t7 Y1 S( LFlags 游冽:
9 G3 }2 A- J3 S- e
I (ignore case嚗銝蝞∪之撠撖怠撥銵摰摮銝脣寥嚗FLAG敶梢燎ewriteRule隞文豢RewriteCond 隞
& h; n" ?1 ]! z- @F (Forbidden) 撠摰X嗥垢嚗甇㎞EWRITING蝔摨銝虫403航炊嚗瘜冽券蝔格瘜銝FORMATSTRING 舐∠函銝血臭誑閮剔蔭箔遙雿蝛箏銝脯
3 \5 s7 H, m" n& }5 R  ^  x6 BL (last rule) 銝其遙雿撖怨
冽迨甇a撖怎摨嚗雿輻券FLAG隞仿餅迫嗅鋡恍撖怎URI鋡怠Y閬甈⊿撖
4 j' l3 M/ F# @& n, C% oN (Next iteration) 撘瑕買EWRITINGENGINE隤踵渲格銝虫敺剝閬瑼X伐靽格孵靽摮嚗嚗甈⊥貊崇epeatLimit摰潮塚憒詨潸N FLAG撠鋡怠蕭
4 }7 J0 j, Q1 `: I6 [, n( {NS (Next iteration of the same rule) 隞代璅閮撌乩銝敺詨閬閬蝔摨嚗靘憒撘瑕園銴閬剁嚗RepeatLimit隞斗摰銝銴瑁銝閬憭扳貊殷
2 P7 t8 }* {# r" F4 L0 |P (force proxy) 撘瑕嗥桃URI典折典撥嗥箔誨瘙銝虫蝡喲ISAPI游隞隞瘙嚗敹蝣箄隞摮銝脫臭URI砍霅唬蜓璈蝑蝑血隞撠餈航炊
6 S+ e9 ]% M  k4 Z. T* I# bR (explicit redirect嚗撘瑕嗆典摰X嗥垢澆粹摰蝷箏單蝑嚗靘桃URI啣啣嚗摰閬蝬撣豢舀敺閬
, f, C  @  H( ?! B/ p! yRP (permanent redirect) 撟曆[R]璅閮詨雿舐澆301HTTP銝302HTTP隞蝣
6 I# I# A* A9 @1 SU (Unmangle Log) 貸RI臭皞瘙銝舫撖恍瘙閮頛URI+ T. I; r" `0 S
O (nOrmalize) 典祕銵銋璅皞摮銝脯璅皞柿RL-ENCODING嚗銝瘜摮銝脩蝘餃蝑嚗璅閮撠墀RLSURLS-ENDODED剜舀函
1 }/ j  B$ l$ Z+ jCL (Case Lower) 撠撖5 s" _3 o6 X+ m9 |' I2 R6 G
CU (Case Upper) 憭批神

; J+ }4 @% u7 i6 S暺靘鈭,閬憒雿閮剖賢祕曆餈啁,隞乩舀靘摮(.htaccess apachehttpd.conf拍冽迤閬銵函內撘):
& @; G0 y6 A: q! W- x8 ?
  • .htaccess    甇斗暹潛雯蝡寧桅
    1. # -FrontPage-1 m" N/ {1 H% i
    2. IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
      . A) O. E0 q! s3 N% Z
    3. # disable directory browsing( N& R+ y8 E; V4 h" Q: }5 s
    4. Options All -Indexes
      % w9 c& W; L8 F" P& r' X
    5. RewriteEngine On    # 撠 RewriteEngine 璅∪
      / [  O! }8 f, g
    6. RewriteBase /    #閮剖箇雯蝡寧桅# c# Z) k/ f' A1 ^/ |
    7. #8 b4 ]7 l6 \* h. d
    8. RewriteCond %{HTTP_HOST} ^av4u.info [NC]0 }* s. X& K6 ~
    9. RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]( n7 T7 [# X( Z! g2 T3 \' L
    10. RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2
      - P6 S+ T# ?' S1 x: ]* }
    11. RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$2
      : C# Z: u& ]' d
    銴鋆賭誨蝣

    5 ^+ e8 F3 M5 j( ]1 c. }( q
  • Apache銋httpd.conf    /etc/httpd/conf/httpd.conf銝血乩蝬脩桅畾萄銝:
    1. <Directory "/www/coav4u/test">
      4 N" {4 `7 I4 j8 T4 ]2 S7 ~
    2.         RewriteEngine On  # 撠 RewriteEngine 璅∪& F) Y3 @$ f: C  N0 k, W
    3.         RewriteBase /        #閮剖箇雯蝡寧桅
      7 R: Z! s6 m5 d2 y/ r6 c. Y
    4.         RewriteCond %{HTTP_HOST} ^av4u.info [NC]) ]- J0 h9 j% A7 d' C; }
    5.         RewriteRule ^(.*)$ HTTP://www.av4u.info/$1 [L]3 G6 d( o6 t, u( H
    6.         RewriteRule ^forum-(\w+)-([0-9]+)\.html$ forum.php?mod=forumdisplay&fid=$1&page=$2
      % ~+ g1 t6 G7 P) P! `% g
    7.         RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ forum.php?mod=viewthread&tid=$1&extra=page\%3D$3&page=$28 }& A5 Q6 L7 a
    8.         Options Includes FollowSymLinks
      # j4 O2 }1 Z5 B( h
    9.         AllowOverride All
      0 Z0 v# b6 m0 Y$ A0 D
    10.         Allow from all
      1 M' H) t# A- j, T9 Z
    11.         Order allow,deny7 x3 w) U! Z9 `5 C% B4 q" z
    12.         addDefaultCharset UTF-8; C" I1 j) k- ]! B
    13. </Directory>
      ( \. {, A$ e# C* d) j
    銴鋆賭誨蝣
    摮瑼敺閮敺httpd : service httpd restart
    % F3 \. o; g: G/ ~3 E1 u. f9 f

雿輻券

祉蝛閬

BT蝳

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

QQ|撠暺撅||52AV璈A

GMT+8, 2024-11-24 08:08 , Processed in 0.065813 second(s), 17 queries .

蝯∠.撱

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

鋆貉憒 敹恍敺 餈銵