腾讯云网站解决方案帮您轻松应对建站成本高/网络不稳等常见问题

克米设计之图展中心-全功能版伪静态规则设置

0
回复
721
查看
[复制链接]

690

主题

704

帖子

3万

积分

董事

Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72Rank: 72

积分
31818
     紫钻仅向指定用户开放  
发表于 19-4-2 17:13:05 | 显示全部楼层 |阅读模式
后台设置伪静态开启后,请根据自己主机添加相应的伪静态规则即可.. d! N, w% ~5 G- ^4 h

7 P3 U8 H' ?+ j0 z0 i8 OApache Web Server(独立主机用户):
# e' W  P2 @% g" ~; ^& t
  1. <font size="3"><IfModule mod_rewrite.c>
    1 b& g; B$ B6 t9 q7 L, k3 d/ d
  2. RewriteEngine On4 ^0 {- X  K) J0 }& _1 A3 ~
  3. RewriteCond %{QUERY_STRING} ^(.*)$
    $ @+ S4 s& j6 T8 f! X& f
  4. RewriteRule ^(.*)/image-([0-9]+)\.html$ $1/plugin.php?id=comiis_imgshow&tid=$2&%1
    # r" }, \6 g( Y
  5. RewriteCond %{QUERY_STRING} ^(.*)$
    ! O; W' \5 T6 t  c
  6. RewriteRule ^(.*)/portal-([0-9]+)\.html$ $1/plugin.php?id=comiis_imgshow&aid=$2&%11 i1 x, Q. [9 ], }' G' o0 X
  7. </IfModule>: e& u( Z0 a% z, [
  8. </font>
复制代码
0 U+ P8 K! x( c  W1 K3 ]7 l
Apache Web Server(虚拟主机用户):
" R5 d* ^! ^4 ]9 E; `
  1. <font size="3"># 将 RewriteEngine 模式打开4 ?3 o+ G& ?( U+ M) s1 {$ m( R, \
  2. RewriteEngine On
    + N- o' W* b5 P- N# e; u2 `1 {

  3. " E9 y* b, a" G: x/ U
  4. # 修改以下语句中的 /discuz 为您的论坛目录地址,如果程序放在根目录中,请将 /discuz 修改为 /" G: P* _: |$ y3 b# }
  5. RewriteBase /discuz
    2 l# B- j2 ]0 X& O4 I
  6. 7 Q8 R9 v+ v/ Q4 f, _* l( @& X
  7. RewriteCond %{QUERY_STRING} ^(.*)$+ D3 E& L" p2 a, f
  8. RewriteRule ^image-([0-9]+)\.html$ plugin.php?id=comiis_imgshow&tid=$1&%1
    % v  r+ l& H* q7 t& b* p
  9. RewriteCond %{QUERY_STRING} ^(.*)$
    - B6 S/ i2 _; `4 ~" m
  10. RewriteRule ^portal-([0-9]+)\.html$ plugin.php?id=comiis_imgshow&aid=$1&%1</font>
复制代码

& D* O2 X  K4 U1 c3 f* ^. uIIS Web Server(独立主机用户):6 Y2 K; `( Z4 S5 _3 d
  1. <font size="3">[ISAPI_Rewrite]# r! M9 G& R5 G7 |$ Z8 Q

  2. $ ?. A: ~5 h1 }. q0 K
  3. # 3600 = 1 hour
    / }0 k, H- q: N6 w4 k6 g+ C
  4. CacheClockRate 36004 s4 J3 y! X3 i( N: \- V
  5. 8 u; _' @5 |5 `$ W1 j: f1 K
  6. RepeatLimit 32
    ! R( \7 K5 o$ V# K) y; {0 f
  7. , e  m3 j) Q! d. w
  8. # Protect httpd.ini and httpd.parse.errors files6 ]# s' L6 a6 G5 u- D; p
  9. # from accessing through HTTP$ V4 D/ u4 }5 U; y3 u# K
  10. RewriteRule ^(.*)/image-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=comiis_imgshow&tid=$2&$4
    ) S+ I- Q' S7 g) g. o
  11. RewriteRule ^(.*)/portal-([0-9]+)\.html(\?(.*))*$ $1/plugin\.php\?id=comiis_imgshow&aid=$2&$4</font>
复制代码
" {6 G3 E; H% u6 B; }3 O
IIS7 Web Server(独立主机用户):' S2 C2 `, k* O0 r: y
  1. <font size="3"><rewrite>  C2 d7 `  J1 i# Q  x- M: z
  2. <rules>: `' K: e7 w' j" K0 X" a
  3. <rule name="image">1 P: R9 P9 q4 a* F+ H0 D# y0 Q
  4. <match url="^(.*/)*image-([0-9]+).html\?*(.*)$" />' ~0 d. i+ D7 s( R6 m
  5. <action type="Rewrite" url="{R:1}/plugin.php\?id=comiis_imgshow&tid={R:2}&{R:3}" />
    : j( b' c' e# j
  6. </rule>
    5 y, b+ G" W4 m9 |/ j2 F7 A
  7. <rule name="portal">) n6 u% f8 V7 J/ R1 X
  8. <match url="^(.*/)*portal-([0-9]+).html\?*(.*)$" />4 g  D8 H. B2 v7 [1 m* V
  9. <action type="Rewrite" url="{R:1}/plugin.php\?id=comiis_imgshow&aid={R:2}&{R:3}" />
    # c! v- L# ?7 s; M
  10. </rule>8 _. ?+ S6 Y, n9 S" B; S5 y
  11. </rules>& ]! Z; a4 N) {& _% h! j
  12. </rewrite></font>
复制代码

3 ~9 o9 A" [/ jZeus Web Server:0 x8 _2 L# \& U5 p1 `4 l# I  }
  1. <font size="3">match URL into $ with ^(.*)/image-([0-9]+)\.html\?*(.*)$
    8 _7 z: P- x+ L0 y
  2. if matched then
      T8 O/ D1 @0 A% ^; S( c
  3. set URL = $1/plugin.php?id=comiis_imgshow&tid=$2&$3! Z# O( Z/ ]& B/ u  X
  4. endif! d* N1 r* l0 u: H5 d# x9 Z
  5. match URL into $ with ^(.*)/portal-([0-9]+)\.html\?*(.*)$% I; f) B2 ~2 N/ [# g2 I
  6. if matched then5 w/ `8 E7 k0 C: d7 s( Y! Q/ P+ f3 `
  7. set URL = $1/plugin.php?id=comiis_imgshow&aid=$2&$37 f3 ]1 O- C$ C3 E9 q, q2 y, k! W, I
  8. endif</font>
复制代码

1 G& R) T( Y3 O' p- VNginx Web Server:' U1 m* q3 e; q1 ]* R
  1. <font size="3">rewrite ^([^\.]*)/image-([0-9]+)\.html$ $1/plugin.php?id=comiis_imgshow&tid=$2 last;9 a# B( q2 ~% L4 C+ L* i, x3 B
  2. rewrite ^([^\.]*)/portal-([0-9]+)\.html$ $1/plugin.php?id=comiis_imgshow&aid=$2 last;! o  [, j# N4 O5 F: p# |
  3. if (!-e $request_filename) {
    ( K( H7 u& D% T. v, }* I
  4. return 404;
    # r8 ]5 j1 O$ t  x9 _* y+ m/ _
  5. }</font>
复制代码
/ C" X9 F+ u  m  I& Q6 Z. U

qiuqiufa.com

网站简介

球球发,是一家 Discuz! 商业插件、风格模板、网站源码、 Discuz!运营维护技术等于一体的交流分享网站,全站95%的资源都是免费下载,对于资源我们是每天更新,每个亲测资源最新最全---球球发(如果我们有侵犯了您权益的资源请联系我们删除