apache( a# x* _7 H1 ~" R3 V' U' \
[mw_shl_code=applescript,true]<IfModule mod_rewrite.c># {3 K9 P) V {
RewriteEngine On
( n2 c; _# e1 _7 k$ hRewriteCond %{HTTP_HOST} ^wwww.a.com1 l5 H; B. J4 @# S/ g0 P
RewriteRule ^(.*)$ http://www.a.com/$1 [R=permanent,L]! F; Y) r, a u; c
</IfModule>[/mw_shl_code]1 b7 g; Y3 c) m, |3 D
% g- J4 ^$ H+ E1 a7 c# s
nginx二樓的也行,不過一般不建議用低效的if語句。。
0 C( W0 S1 I9 Z$ |6 g+ @[mw_shl_code=applescript,true]server {
# U3 n. G0 @7 M( L# l5 r5 Z2 p$ p8 \server_name wwww.a.com;
; a7 ^- C, D" I) h, o& Zrewrite ^(.*) http://www.a.com$1 permanent;
% x8 v5 X @2 u: ~& K7 j* M}[/mw_shl_code]
& n) `+ ]6 ~7 ^! i |