-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
executable file
·91 lines (73 loc) · 2.87 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+?)$
RewriteRule ^(.*)$ https://$1 [R=301,L]
# Main
RewriteBase /
RewriteRule ^home/?$ / [R=301]
RewriteBase /intent
RewriteRule ^intent/toot/?$ share\.php [NC,L]
RewriteBase /login
RewriteRule ^login/?$ login/login\.php [NC,L,QSA]
RewriteRule ^auth/?$ login/auth\.php [NC,L,QSA]
RewriteRule ^logout/?$ login/logout\.php [NC,L,QSA]
RewriteRule ^terms/?$ login/terms\.php [NC,L,QSA]
RewriteRule ^privacy/?$ login/privacy\.php [NC,L,QSA]
RewriteRule ^imprint/?$ login/imprint\.php [NC,L,QSA]
# LTL
RewriteBase /local
RewriteRule ^local/?$ local\.php [NC,L]
# FTL
RewriteBase /federated
RewriteRule ^federated/?$ federated\.php [NC,L]
# Notice
RewriteBase /notifications
RewriteRule ^notifications/?$ notifications\.php [NC,L]
# Bookmarks
RewriteBase /bookmarks
RewriteRule ^bookmarks/?$ bookmarks\.php [NC,L]
# Who to follow
RewriteBase /whotofollow
RewriteRule ^whotofollow/?$ who_to_follow\.php [NC,L]
# Direct
RewriteBase /direct
RewriteRule ^direct/?$ direct\.php [NC,L]
# Instance
RewriteBase /instance
RewriteRule ^instance/?$ instance\.php [NC,L]
# Lists
RewriteBase /lists
RewriteRule ^lists/?$ lists\.php [NC,L]
RewriteRule ^lists/(\d+)/?$ lists_view\.php?id=$1 [NC,L,QSA]
RewriteRule ^lists/(\d+)/add/?$ lists_add\.php?id=$1 [NC,L,QSA]
# Search
RewriteBase /search
RewriteRule ^search/?$ search_hash_tag\.php [NC,L,QSA]
RewriteRule ^search/users/?$ search_user\.php [NC,L,QSA]
# Settings
RewriteBase /settings
RewriteRule ^settings/?$ settings_general\.php [NC,L]
RewriteRule ^settings/profile/?$ settings_profile\.php [NC,L]
RewriteRule ^settings/appearance/?$ settings_appearance\.php [NC,L]
RewriteRule ^settings/filters/?$ settings_filters\.php [NC,L]
RewriteRule ^settings/media/?$ settings_media\.php [NC,L]
RewriteRule ^settings/followers/?$ settings_accounts\.php [NC,L]
RewriteRule ^settings/mutes/?$ settings_accounts\.php [NC,L]
RewriteRule ^settings/blocks/?$ settings_accounts\.php [NC,L]
# User
RewriteBase /
RewriteRule ^@(.+)@(.+)\.([a-z]+)/?$ user\.php?user=@$1@$2\.$3 [NC,L,QSA]
RewriteRule ^@(.+)@(.+)\.([a-z]+)/status/(.+?)?$ user\.php?user=@$1@$2\.$3&status=$4 [NC,L,QSA]
RewriteRule ^@(.+)@(.+)\.([a-z]+)/media/?$ user_only_media\.php?user=@$1@$2\.$3 [NC,L,QSA]
RewriteRule ^@(.+)@(.+)\.([a-z]+)/with_replies/?$ user_include_replies\.php?user=@$1@$2\.$3 [NC,L,QSA]
RewriteRule ^@(.+)@(.+)\.([a-z]+)/followers/?$ user_followers\.php?user=@$1@$2\.$3 [NC,L,QSA]
RewriteRule ^@(.+)@(.+)\.([a-z]+)/following/?$ user_following\.php?user=@$1@$2\.$3 [NC,L,QSA]
RewriteRule ^@(.+)@(.+)\.([a-z]+)/favourites/?$ user_favorite\.php?user=@$1@$2\.$3 [NC,L,QSA]
# Image
RewriteBase /
RewriteRule ^avatars/original/missing\.png$ assets/images/missing\.png [NC,L]
RewriteRule ^headers/original/missing\.png$ assets/images/missing_header\.png [NC,L]
# 404
RewriteRule ^404/?$ 404\.php [NC,L,QSA]
ErrorDocument 404 /404
</IfModule>