ApacheConf代码: 发芽网根目录的.htaccess
01 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
02
03 #FastCGI
04 AddHandler fcgid-script .fcgi
05 RewriteEngine On
06
07 #Drop WWW Prefix
08 RewriteBase /
09 RewriteCond %{HTTP_HOST} ^www\.fayaa\.com$ [NC]
10 RewriteRule ^(.*)$ http://fayaa.com/$1 [L,R=301]
11
12 #Static Files
13 RewriteBase /
14 RewriteRule ^(static/.*)$ - [L]
15 RewriteRule ^(web/.*)$ - [L]
16 RewriteRule ^(bbs/.*)$ - [L]
17
18 #Django FastCGI Launch
19 RewriteCond %{REQUEST_FILENAME} !-f
20 RewriteRule ^(.*)$ t.fcgi/$1 [QSA,L]
21
22 #Sub Domains
23 RewriteCond %{HTTP_HOST} ^code.fayaa.com$ [OR]
24 RewriteCond %{HTTP_HOST} ^www.code.fayaa.com$
25 RewriteRule ^(.*)$ "http\:\/\/www\.fayaa\.com\/code\/" [R=301,L]