|
|
发表于 2013-3-11 13:35:01
|
显示全部楼层
% I D9 L& y3 T3 K( V6 C3 n打开记事本,把下面代码粘贴进去:
! v3 o0 B* U: @1 A2 Z" }7 u; x' Q- j# I[ISAPI_Rewrite]
9 M1 G6 u% Q; f- q. B$ m) m$ ^5 L# r! e8 i
# 3600 = 1 hour3 E# V. u& E1 T# V0 ]. u
4 F6 U0 A O2 UCacheClockRate 36006 T3 R2 j% d6 W- v y
/ }1 K* q: j) K; s4 G( W8 fRepeatLimit 32. h" Z& c- g# n1 O( @% _% n
- _, q2 a" K# }- R# Protect httpd.ini and httpd.parse.errors files& [: l+ I" g6 y0 @4 c5 N! `
' m( D6 u t8 x9 y( E! {' U ?' }# from accessing through HTTP
/ W& j% C1 k; _4 L3 ~1 M3 W
p5 U1 h* U# b* v1 x& b" u- w# Rules to ensure that normal content gets through
: u, {1 w' d: l" g
- q9 L3 L/ ? d- S* c3 r2 w4 k6 D' w+ `RewriteRule /sitemap.xml /sitemap.xml [L]! g) R+ m) F2 }, [* B1 T
2 ~6 `& K! K. _3 W& u
RewriteRule /favicon.ico /favicon.ico [L]
" ]- N- F; G* r. Z% z( [+ b* w$ n2 L( B P: t0 K
# For file-based wordpress content (i.e. theme), admin, etc.2 h4 v' B6 J6 U2 _5 y, J
# C j) Y8 N7 x4 @' t. ~RewriteRule /wp-(.*) /wp-$1 [L]
( J/ z& N" Z; q& J
- b9 W' z- ?* b( s) y# For normal wordpress content, via index.php
1 o2 F, r/ D0 c& j' M" [6 M% U: \4 D3 r. |
RewriteRule ^/$ /index.php [L]
9 B S5 p5 @' r8 q5 R' N4 n# _
& d3 h1 {, p% X$ ?RewriteRule /(.*) /index.php/$1 [L]
7 Z& n! M5 n& a9 d8 }8 b4 ~$ E' t; g+ A, c% \ w
保存时保存类型选择“所有文件”,并输入文件名称:httpd.ini1 F, ?" y* j* a& a/ I+ w- L
% O) b0 ]' Q0 C# D4 Z5 R/ V0 R将这个httpd.ini文件上传到WP程序所在的目录也就是与index.php在同一个目录内。; f$ V6 P4 u# G( y9 D' C) L8 }
. r# e$ j" I5 M4 e ]之后进入WP后台修改固定链接,比如:/%category%/%post_id%.html |
评分
-
查看全部评分
|