本帖最后由 hardrock 于 2014-11-6 23:20 编辑 2 C a: F+ p+ v6 r+ l2 `/ ^' l0 A) r
) D) }- Y! e' [9 ]
wampserver2.2e版-32bits不支持固定链接(伪静态)。1 a+ D2 M9 o- r4 s+ r
Wampserver2.4版-32bits支持固定链接(伪静态)吗?; d: J' V+ [ q0 L, b
$ W, v8 g! o4 b0 r- ?+ Z* [
两个都支持,% G% x; _; p/ _. K8 P k) J
http://www.thegrouplet.com/forum.php?mod=viewthread&tid=112908
; ^' E9 Q& A& u7 h0 f7 i, V http://www.wpdaxue.com/wampserver.html " K" g3 U$ y; `
http://www.wpdaxue.com/wordpress-change-hosting.html
; m" A/ ^) G( O http://www.wpdaxue.com/basic-skills-of-creating-themes.html
( M' s6 w, e( e& @0 y/ k WampServer 配置伪静态(固定链接),3 i# a4 w+ O3 U. b- @! Y* y5 T
安装后建议开启Apache的 mod_rewrite模块,- d6 C( ^/ t. ?
要不然设置静态化的网页打不开提示404错误
8 L, U+ Z5 a) z; z/ U 默认情况下,WampServer不支持伪静态,我们需要进行一些配置
- p# z9 C' B% K2 s' [ 1.启动wampserver服务,左键单击右下角wampserver图标,打开Apache菜单下“httpd.conf”文件;3 }% H2 o |: ^9 K+ A( I! N) P1 _
2.搜索找到“LoadModule rewrite_module modules/mod_rewrite.so”这一行,去掉前面的“#”;
% ?5 Q" x# g% L, n. {$ U 3.找到“AllowOverride None”改为“AllowOverride All”;
; j/ Y& ?* I' \1 i6 M 4.重启wampserver的所有服务2 P/ q# b) A5 \% A6 R7 y
5.新建.htaccess文件,放在当前网站根目录下,\wamp\www\.htaccess , 在.htaccess文件中添加伪静态规则,比如添加WordPress伪静态规则:
+ p$ p- L/ t0 f Apache伪静态规则% s' K. v6 f; X+ [
# BEGIN WordPress
2 i$ Y7 l* q8 n6 ] <IfModule mod_rewrite.c>* n/ {5 k x5 l* x
RewriteEngine On
# `& @& t) h7 U# k' a0 b" e* o RewriteBase /( a0 ~" m" Q! ~! c1 g/ V) e8 Q
RewriteRule ^index\.php$ - [L]
: s0 v: `& G! b' Z1 D+ |3 N9 I RewriteCond %{REQUEST_FILENAME} !-f6 ?) H/ O/ y1 d* F0 j
RewriteCond %{REQUEST_FILENAME} !-d; k' s+ X1 i* g* E" }# R" B
RewriteRule . /index.php [L]
w2 _# V0 U6 A j% h) \ </IfModule>
3 p7 A! l( h- C # END WordPress 复制代码 注:每个建站程序的伪静态规则不一样,请根据自己的需要添加。
' A! Q& M4 I* |1 @5 i6 v 如果wp文件放在目录a下,.htaccess要放在目录a下,\wamp\www\a\.htaccess
; V' y2 a6 e- ^- A5 H # BEGIN WordPress
, _4 k& S1 g, v. a6 l <IfModule mod_rewrite.c>" a& e8 U, f$ `& Y! H5 ` ^
RewriteEngine On
2 L e) x+ _. v, J: P9 c, |0 L RewriteBase /a/
- ~ }: n/ V' }0 C1 e( p! v. S! O RewriteRule ^index\.php$ - [L] n" D5 {; u, h) d5 D1 u, `
RewriteCond %{REQUEST_FILENAME} !-f7 k6 T/ @! D% c9 v# {) K0 {4 ]
RewriteCond %{REQUEST_FILENAME} !-d, M6 x% k) }+ W) n2 I3 q
RewriteRule . /a/index.php [L]* X7 Z- w* t9 g, q
</IfModule>9 P" J% o7 f, o
# END WordPress 复制代码 - T/ D6 ~* o8 K, r
访问就用 http://localhost/a/ ,7 F' s+ T1 m; a M6 a
wp后台----WordPress地址(URL)----站点地址(URL), 要改成 http://localhost/a/
/ s" q; ~* L$ W- A ' B. ]9 S! v5 ^9 d" K- _
4 Y8 R3 I7 _# E2 o php.ini部分3 A7 N& ~& ?: R& p s" c& N
memory_limit =128M
/ n4 R! m4 k B: c$ @* f/ K5 q post_max_size = 8M# f+ H: {; _. j& Y8 l
upload_max_filesize = 2M9 A0 B' ]% W! M4 ~/ x9 A7 V- n
: V( p$ V1 w( M9 x
php环境下无法上传大文件的解决方法 http://www.ppsmove.com/stationtec/4862.html
6 G/ @* @3 r% e# G
# f- b: R! N& x( s , `4 i3 p- ^- K U! ]
( ^6 ^% ^5 ]% t
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 5 C' ^+ `1 x1 o1 ?* {
WP Migrate DB 数据库迁移插件 在本地测试站安装,在导出数据库前更改数据库网址和文件路径等,然后导出数据库。网站移植到空间后,然后在 phpMyAdmin 导入刚才导出的数据库文件即可。站点数据等更改完成后就可以卸载这插件了$ S* t4 D8 e7 m2 c" T. S
D* ~9 P3 r, s5 i! o# N* G7 g ( j+ K' ^+ ?6 Z
" s( V+ Z0 w7 _
. \4 d B$ O# Z w; X* X Pretty Link http://www.wpdaxue.com/pretty-link.html
) t% C9 v$ B, G6 s9 q8 F' l 在WordPress后台“安装插件”中直接搜索Pretty Link,搜索结果中是Pretty Link Lite,也就是Pretty Link的简易免费版本8 T& Q# f n& Z( g! Y* s
% N* i4 J: Y1 F2 B
7 F: Q; ^& Y; F) [0 O
. q2 Q- q0 L' Z
How To Move Your WordPress Website From localhost To Live Server
" |& s3 Y( h; x8 K& G8 j& ^3 X; l http://www.wpexplorer.com/wordpress-local-to-live/ 7 r- c0 k, E1 W' F& H' E( z
0 m- Q, x6 e0 H' H) [5 m4 b
相关帖子