|
|
本帖最后由 hardrock 于 2014-11-6 23:20 编辑 ' N( f8 y( ?$ T) k2 l; m2 h' J
Y" O( y; `$ ^3 h) m: cwampserver2.2e版-32bits不支持固定链接(伪静态)。5 |( o/ G. k, [, I c, N
Wampserver2.4版-32bits支持固定链接(伪静态)吗?: J& ~+ N, P) L/ n' k) n5 c7 G
- G& \& E4 o$ g9 T+ k( N
两个都支持,
5 ]- s3 n W' n0 f* a& Ahttp://www.thegrouplet.com/forum.php?mod=viewthread&tid=112908& s$ ~8 W) v2 W4 r+ l
http://www.wpdaxue.com/wampserver.html
: u2 Y6 t+ L1 @3 ~8 P# qhttp://www.wpdaxue.com/wordpress-change-hosting.html2 w/ U n3 ^0 z& ]4 D8 ]+ n4 U
http://www.wpdaxue.com/basic-skills-of-creating-themes.html
) i7 W. @) K E) l7 U+ f# t; KWampServer 配置伪静态(固定链接),
3 D+ ~: w) [4 |& a安装后建议开启Apache的 mod_rewrite模块,
$ T9 d d1 x" \0 v要不然设置静态化的网页打不开提示404错误, b5 D# {$ G! k3 b4 n
默认情况下,WampServer不支持伪静态,我们需要进行一些配置
% V- x; { r% n4 |6 O* ?, s! B& J1 ]1.启动wampserver服务,左键单击右下角wampserver图标,打开Apache菜单下“httpd.conf”文件;. [$ m4 s- B$ g- k, W6 E
2.搜索找到“LoadModule rewrite_module modules/mod_rewrite.so”这一行,去掉前面的“#”;/ `3 {+ k5 r) J( E/ n7 }
3.找到“AllowOverride None”改为“AllowOverride All”; H# E& Y+ d+ e# P ~
4.重启wampserver的所有服务- y9 ]% t' g' k3 @1 K
5.新建.htaccess文件,放在当前网站根目录下,\wamp\www\.htaccess , 在.htaccess文件中添加伪静态规则,比如添加WordPress伪静态规则:) s. b1 O0 A4 e; t
Apache伪静态规则- f ~! q/ L: {. I7 ~/ t
- # BEGIN WordPress; s: ~* v6 [! L4 X7 r
- <IfModule mod_rewrite.c>1 V& Q/ p, F0 p9 T* N7 j8 _, B
- RewriteEngine On4 t5 W S" N: Z4 n# \6 T
- RewriteBase /1 q6 g3 A' ?6 o) X4 ?
- RewriteRule ^index\.php$ - [L]! d" ]1 j( b. d
- RewriteCond %{REQUEST_FILENAME} !-f2 a+ J% [! n1 E! D! l4 U
- RewriteCond %{REQUEST_FILENAME} !-d
0 q% |( v3 x( _# a3 ]4 y - RewriteRule . /index.php [L]- T' x1 F o, u/ s9 Q! m
- </IfModule>
. I% ^. q/ U7 } - # END WordPress
复制代码 注:每个建站程序的伪静态规则不一样,请根据自己的需要添加。
, H8 k2 s$ e$ a& \; v; Q& v如果wp文件放在目录a下,.htaccess要放在目录a下,\wamp\www\a\.htaccess
+ d, \* z+ Z a/ t9 i9 ~5 A# J- c- # BEGIN WordPress
! ?& U6 o& b( U# h0 N7 b9 s4 h - <IfModule mod_rewrite.c>
3 Y, ~0 }/ }$ }8 E8 Z4 v - RewriteEngine On
& u" h) J, T; X. K% P- [! W - RewriteBase /a/; k$ h$ D. G& g! R, t# F2 m
- RewriteRule ^index\.php$ - [L]
. }1 B# C5 p2 S, F- w - RewriteCond %{REQUEST_FILENAME} !-f
8 p2 p9 f' x" X) f. v - RewriteCond %{REQUEST_FILENAME} !-d
' }6 k1 _, E6 A" b4 ] - RewriteRule . /a/index.php [L]) V; p; u! r/ A. ]3 v3 M, ~
- </IfModule>
5 w$ R# f- P7 F0 R9 T% K - # END WordPress
复制代码 W* x! ^& j) H. j4 _0 \0 N
访问就用 http://localhost/a/ ,* v. V( |/ Y m! g
wp后台----WordPress地址(URL)----站点地址(URL), 要改成 http://localhost/a/
" y2 \8 e; m; t) r8 \& p: N1 ^. j {5 R
5 E6 T6 z# Q( h
php.ini部分
! M- P& G3 \/ h0 U, y/ ~# W5 c" Umemory_limit =128M
9 P- }' y8 D1 e5 ]( zpost_max_size = 8M4 \/ @5 _8 F4 Z
upload_max_filesize = 2M
2 ?% F1 J- N, {3 S" f: `, N+ A# e4 B8 Z' S
php环境下无法上传大文件的解决方法 http://www.ppsmove.com/stationtec/4862.html
* n a2 p4 l7 H% n5 V! g, b0 O6 ^% X9 w' q0 F
) E% y2 o' L9 n% Q) S, ^! k2 H1 h* }
" e6 U6 j- O- A
http://www.solagirl.net/how-to-migrate-wordpress-from-local-computer-to-server.html http://www.solagirl.net/wp-migrate-db.html http://www.wpdaxue.com/wp-migrate-db.html
: ^% H- f7 e0 x& S3 A; W% VWP Migrate DB 数据库迁移插件 在本地测试站安装,在导出数据库前更改数据库网址和文件路径等,然后导出数据库。网站移植到空间后,然后在 phpMyAdmin 导入刚才导出的数据库文件即可。站点数据等更改完成后就可以卸载这插件了: `. i# d3 V- q; ~6 [: }7 m1 E1 h# Q$ h
. Q2 C' N0 A) y- ~4 I6 p
- d/ e _9 P( T3 L: ^; g: N+ z7 {4 m9 r
: r- C- f" s1 n7 n5 f2 w6 Q
- {5 w3 t- i0 m) g; uPretty Link http://www.wpdaxue.com/pretty-link.html) ?) P+ v6 S6 Q6 l2 B; l4 z' u, ^/ S
在WordPress后台“安装插件”中直接搜索Pretty Link,搜索结果中是Pretty Link Lite,也就是Pretty Link的简易免费版本
" T: @* L- Y! h/ a2 M" Y, n- \ g! C5 U; S* k7 V: p
) R% C( Y+ V4 T' ]6 X
( |, x. P% D1 Q, T' a. H% S7 b" BHow To Move Your WordPress Website From localhost To Live Server) e3 f+ N& y6 X# Y$ K5 s, v% s
http://www.wpexplorer.com/wordpress-local-to-live/
1 z- A0 a( B! ~( s! K1 J& i- G6 {/ x' q1 R2 x) W( z6 Z7 H9 u
|
|