apache& {% F/ \! t- N& b; M+ @, H
[mw_shl_code=applescript,true]<IfModule mod_rewrite.c>8 |5 S @6 h [- u
RewriteEngine On# W! c* c) v4 z0 o k
RewriteCond %{HTTP_HOST} ^wwww.a.com
. Y: s" E1 A @; w8 wRewriteRule ^(.*)$ http://www.a.com/$1 [R=permanent,L]
) ?: k; e5 k0 C! ~4 u9 _</IfModule>[/mw_shl_code]: J+ n* `. G9 b! d" ?4 v7 F
# A' H" j! M2 L) \- H# tnginx二樓的也行,不過一般不建議用低效的if語句。。
$ v' }& g2 k1 \[mw_shl_code=applescript,true]server { 5 d' L! p, K" [3 j' Y
server_name wwww.a.com;
5 [8 ~: I* U. V, `. Z% P4 Irewrite ^(.*) http://www.a.com$1 permanent;
1 I# ~ u3 s- i1 l}[/mw_shl_code]6 ~9 C1 W2 p; k% Y" b8 u
|