apache
* l+ ~, ^4 b1 p/ z% F[mw_shl_code=applescript,true]<IfModule mod_rewrite.c>
: A+ ^. k6 \4 E/ O- `! NRewriteEngine On1 `0 F& L) N0 i7 r- I
RewriteCond %{HTTP_HOST} ^wwww.a.com7 ]7 Y- M; c9 e" n/ M z& a
RewriteRule ^(.*)$ http://www.a.com/$1 [R=permanent,L]
4 R T3 b, h( W</IfModule>[/mw_shl_code]( K4 v" S2 c! K- [
9 r+ d8 g) L# c7 Y
nginx二樓的也行,不過一般不建議用低效的if語句。。
+ r+ q! n/ @5 R; f[mw_shl_code=applescript,true]server {
0 r/ n8 U7 b p5 Tserver_name wwww.a.com; # v& q1 d: Z8 n( l& f; _
rewrite ^(.*) http://www.a.com$1 permanent;
2 S9 _* O" V, w' z# _8 d2 O" F}[/mw_shl_code]8 z; @7 p7 l8 i9 h) z: `2 ^
|