<IfModule mod_rewrite.c>
RewriteEngine on
#RewriteBase /

RewriteRule ^index\.html index.php [L]
RewriteRule ^index-([0-9_]*)-(0|1)?-([0-9]*)\.html(&.*)? index.php?area_id=$1&list_mode=$2&p=$3$4 [L]
RewriteRule ^list_([a-z]+)-([0-9_]*)-(0|1)?-([0-9]*)\.html(&.*)? list.php?mode=$1&area_id=$2&list_mode=$3&p=$4$5 [L]
RewriteRule ^article_([a-z]+)-([0-9]+)-([0-9]*)\.html(&.*)? article.php?mode=$1&id=$2&p=$3$4 [L]


#让www.re2.cn访问re2目录论坛 
RewriteCond %{HTTP_HOST} ^www.re2.cn$ [NC]
RewriteCond %{REQUEST_URI} !^/re2/
RewriteRule ^(.*)$ re2/$1
RewriteCond %{HTTP_HOST} ^www.re2.cn$
RewriteRule ^(/)?$ re2/index.html [L]

#让bbs.162100.com访问bbs目录论坛 
RewriteCond %{HTTP_HOST} ^bbs.162100.com$ [NC]
RewriteCond %{REQUEST_URI} !^/bbs/
RewriteRule ^(.*)$ bbs/$1
RewriteCond %{HTTP_HOST} ^bbs.162100.com$
RewriteRule ^(/)?$ bbs/index.html [L]
</IfModule>

<IfModule mod_deflate.c>
#压缩网页
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
AddOutputFilterByType DEFLATE font/truetype font/opentype
#AddOutputFilterByType DEFLATE image/ico
# Drop problematic browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E]!no-gzip !gzip-only-text/html
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>

<IfModule mod_expires.c>
ExpiresActive on
#缓存首页及物件新方法
<FilesMatch "obj\.php\?title=.*|\.(gif|jpg|jpeg|png|ico|swf|js|css)$">
ExpiresDefault "access plus 365 days"
Header set Cache-Control "max-age=31536000"
#Header unset Pragma
#Header unset ETag
#FileETag None
</FilesMatch>
</IfModule>