forked from lincanbin/Carbon-Forum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
50 lines (45 loc) · 1.99 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# errordoc
ErrorDocument 404 /404.php
<IfModule mod_rewrite.c>
#强制重定向到带www的顶级域名
RewriteEngine On
RewriteCond %{HTTP_HOST} ^94cb.com$ [NC]
RewriteRule ^(.*)$ http://www.94cb.com/$1 [L,R=301]
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
RewriteBase /
#RewriteRule ^includes - [F,L]
#RewriteRule ^language - [F,L]
#RewriteRule ^styles/default/template - [F,L]
#RewriteRule ^styles/mobile/template - [F,L]
#RewriteRule ^styles/api/template - [F,L]
RewriteRule ^dashboard$ dashboard.php [L]
RewriteRule ^favorites(/page/([0-9]*))?$ favorites.php?page=$2 [L]
RewriteRule ^json/(get_tags|tag_autocomplete|check_username)$ json.php?action=$1 [L]
RewriteRule ^login$ login.php [L]
RewriteRule ^manage$ manage.php [L]
RewriteRule ^new$ new.php [L]
RewriteRule ^notifications$ notifications.php [L]
RewriteRule ^page/([0-9]+)$ index.php?page=$1 [L]
RewriteRule ^register$ register.php [L]
RewriteRule ^reply$ reply.php [L]
RewriteRule ^robots.txt$ robots.php [L]
RewriteRule ^search.xml$ open_search.php [L]
RewriteRule ^search/(.*?)(/page/([0-9]*))?$ search.php?keyword=$1&page=$3 [L]
RewriteRule ^settings$ settings.php [L]
RewriteRule ^sitemap-(topics|pages|tags|users|index)(-([0-9]+))?.xml$ sitemap.php?action=$1&page=$3 [L]
RewriteRule ^t/([0-9]+)(-([0-9]*))?$ topic.php?id=$1&page=$3 [L]
RewriteRule ^tag/(.*?)(/page/([0-9]*))?$ tag.php?name=$1&page=$3 [L]
RewriteRule ^tags/following(/page/([0-9]*))?$ favorite_tags.php?page=$2 [L]
RewriteRule ^u/(.*?)$ user.php?username=$1 [L]
RewriteRule ^users/following(/page/([0-9]*))?$ favorite_users.php?page=$2 [L]
RewriteRule ^upload_controller$ upload_controller.php [L]
RewriteRule ^view-(desktop|mobile)$ view.php?view=$1 [L,QSA]
</IfModule>
# Image and Flash content Caching for One Month
<IfModule mod_expires.c>
ExpiresActive On
<FilesMatch ".(js|css|flv|gif|jpg|jpeg|png|ico|swf|html|json)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
</IfModule>