]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - htaccess.sample
Clean up delete code. Add missing htaccess rule. Exit after errors so the code doesn...
[quix0rs-gnu-social.git] / htaccess.sample
1 RewriteEngine On
2
3 RewriteRule ^$ index.php?action=public [L,QSA]
4 RewriteRule ^rss$ index.php?action=publicrss [L,QSA]
5 RewriteRule ^xrds$ index.php?action=publicxrds [L,QSA]
6
7 RewriteRule ^doc/about$ index.php?action=doc&title=about [L,QSA]
8 RewriteRule ^doc/contact$ index.php?action=doc&title=contact [L,QSA]
9 RewriteRule ^doc/faq$ index.php?action=doc&title=faq [L,QSA]
10 RewriteRule ^doc/help$ index.php?action=doc&title=help [L,QSA]
11 RewriteRule ^doc/im$ index.php?action=doc&title=im [L,QSA]
12 RewriteRule ^doc/openid$ index.php?action=doc&title=openid [L,QSA]
13 RewriteRule ^doc/openmublog$ index.php?action=doc&title=openmublog [L,QSA]
14 RewriteRule ^doc/privacy$ index.php?action=doc&title=privacy [L,QSA]
15 RewriteRule ^doc/source$ index.php?action=doc&title=source [L,QSA]
16
17 RewriteRule ^main/login$ index.php?action=login [L,QSA]
18 RewriteRule ^main/logout$ index.php?action=logout [L,QSA]
19 RewriteRule ^main/register$ index.php?action=register [L,QSA]
20 RewriteRule ^main/openid$ index.php?action=openidlogin [L,QSA]
21 RewriteRule ^main/remote$ index.php?action=remotesubscribe [L,QSA]
22
23 RewriteRule ^main/subscribe$ index.php?action=subscribe [L,QSA]
24 RewriteRule ^main/unsubscribe$ index.php?action=unsubscribe [L,QSA]
25 RewriteRule ^main/confirmaddress$ index.php?action=confirmaddress [L,QSA]
26 RewriteRule ^main/confirmaddress/(.*)$ index.php?action=confirmaddress&code=$1 [L,QSA]
27 RewriteRule ^main/recoverpassword$ index.php?action=recoverpassword [L,QSA]
28 RewriteRule ^main/recoverpassword/(.*)$ index.php?action=recoverpassword&code=$1 [L,QSA]
29
30 RewriteRule ^settings/avatar$ index.php?action=avatar [L,QSA]
31 RewriteRule ^settings/password$ index.php?action=password [L,QSA]
32 RewriteRule ^settings/profile$ index.php?action=profilesettings [L,QSA]
33 RewriteRule ^settings/openid$ index.php?action=openidsettings [L,QSA]
34 RewriteRule ^settings/im$ index.php?action=imsettings [L,QSA]
35 RewriteRule ^settings/email$ index.php?action=emailsettings [L,QSA]
36 RewriteRule ^settings/sms$ index.php?action=smssettings [L,QSA]
37
38 RewriteRule ^search/people$ index.php?action=peoplesearch [L,QSA]
39 RewriteRule ^search/notice$ index.php?action=noticesearch [L,QSA]
40 RewriteRule ^search/notice/rss$ index.php?action=noticesearchrss [L,QSA]
41
42 RewriteRule ^notice/new$ index.php?action=newnotice [L,QSA]
43 RewriteRule ^notice/(\d+)$ index.php?action=shownotice&notice=$1 [L,QSA]
44 RewriteRule ^deletenotice/((\d+))?$ index.php?action=deletenotice&notice=$2 [L,QSA]
45
46 RewriteRule ^user/(\d+)$ index.php?action=userbyid&id=$1 [L,QSA]
47
48 RewriteRule ^tags/?$ index.php?action=tag [L,QSA]
49 RewriteRule ^tag(/(.*))?$ index.php?action=tag&tag=$2 [L,QSA]
50
51 RewriteRule ^(\w+)/subscriptions$ index.php?action=subscriptions&nickname=$1 [L,QSA]
52 RewriteRule ^(\w+)/subscribers$ index.php?action=subscribers&nickname=$1 [L,QSA]
53 RewriteRule ^(\w+)/xrds$ index.php?action=xrds&nickname=$1 [L,QSA]
54 RewriteRule ^(\w+)/rss$ index.php?action=userrss&nickname=$1 [L,QSA]
55 RewriteRule ^(\w+)/all$ index.php?action=all&nickname=$1 [L,QSA]
56 RewriteRule ^(\w+)/all/rss$ index.php?action=allrss&nickname=$1 [L,QSA]
57 RewriteRule ^(\w+)/foaf$ index.php?action=foaf&nickname=$1 [L,QSA]
58 RewriteRule ^(\w+)/replies$ index.php?action=replies&nickname=$1 [L,QSA]
59 RewriteRule ^(\w+)/replies/rss$ index.php?action=repliesrss&nickname=$1 [L,QSA]
60 RewriteRule ^(\w+)/avatar/(original|96|48|24)$ index.php?action=avatarbynickname&nickname=$1&size=$2 [L,QSA]
61
62 RewriteRule ^(\w+)$ index.php?action=showstream&nickname=$1 [L,QSA]
63
64 # Twitter-compatible API rewrites
65 # XXX: Surely these can be refactored a little -- Zach
66 RewriteRule ^api/statuses/public_timeline(.*)$ index.php?action=api&apiaction=statuses&method=public_timeline$1 [L,QSA]
67 RewriteRule ^api/statuses/friends_timeline(.*)$ index.php?action=api&apiaction=statuses&method=friends_timeline$1 [L,QSA]
68 RewriteRule ^api/statuses/user_timeline/(.*)$ index.php?action=api&apiaction=statuses&method=user_timeline&argument=$1 [L,QSA]
69 RewriteRule ^api/statuses/user_timeline(.*)$ index.php?action=api&apiaction=statuses&method=user_timeline$1 [L,QSA]
70 RewriteRule ^api/statuses/show/(.*)$ index.php?action=api&apiaction=statuses&method=show&argument=$1 [L,QSA]
71 RewriteRule ^api/statuses/update(.*)$ index.php?action=api&apiaction=statuses&method=update$1 [L,QSA]
72 RewriteRule ^api/statuses/replies(.*)$ index.php?action=api&apiaction=statuses&method=replies&argument=$1 [L,QSA]
73 RewriteRule ^api/statuses/destroy/(.*)$ index.php?action=api&apiaction=statuses&method=destroy&argument=$1 [L,QSA]
74 RewriteRule ^api/statuses/friends/(.*)$ index.php?action=api&apiaction=statuses&method=friends&argument=$1 [L,QSA]
75 RewriteRule ^api/statuses/friends(.*)$ index.php?action=api&apiaction=statuses&method=friends$1 [L,QSA]
76 RewriteRule ^api/statuses/followers/(.*)$ index.php?action=api&apiaction=statuses&method=followers&argument=$1 [L,QSA]
77 RewriteRule ^api/statuses/followers(.*)$ index.php?action=api&apiaction=statuses&method=followers$1 [L,QSA]
78 RewriteRule ^api/statuses/featured(.*)$ index.php?action=api&apiaction=statuses&method=featured$1 [L,QSA]
79 RewriteRule ^api/direct_messages/sent(.*)$ index.php?action=api&apiaction=direct_messages&method=sent$1 [L,QSA]
80 RewriteRule ^api/direct_messages/destroy/(.*)$ index.php?action=api&apiaction=direct_messages&method=destroy&argument=$1 [L,QSA]
81 RewriteRule ^api/direct_messages/new(.*)$ index.php?action=api&apiaction=direct_messages&method=create$1 [L,QSA]
82 RewriteRule ^api/direct_messages(.*)$ index.php?action=api&apiaction=direct_messages&method=direct_messages$1 [L,QSA]
83 RewriteRule ^api/friendships/create/(.*)$ index.php?action=api&apiaction=friendships&method=create&argument=$1 [L,QSA]
84 RewriteRule ^api/friendships/destroy/(.*)$ index.php?action=api&apiaction=friendships&method=destroy&argument=$1 [L,QSA]
85 RewriteRule ^api/friendships/exists(.*)$ index.php?action=api&apiaction=friendships&method=exists$1 [L,QSA]
86 RewriteRule ^api/account/verify_credentials(.*)$ index.php?action=api&apiaction=account&method=verify_credentials$1 [L,QSA]
87 RewriteRule ^api/account/end_session$ index.php?action=api&apiaction=account&method=end_session$1 [L,QSA]
88 RewriteRule ^api/account/update_location(.*)$ index.php?action=api&apiaction=account&method=update_location$1 [L,QSA]
89 RewriteRule ^api/account/update_delivery_device(.*)$ index.php?action=api&apiaction=account&method=update_delivery_device$1 [L,QSA]
90 RewriteRule ^api/account/rate_limit_status(.*)$ index.php?action=api&apiaction=account&method=rate_limit_status$1 [L,QSA]
91 RewriteRule ^api/favorites/create/(.*)$ index.php?action=api&apiaction=favorites&method=create&argument=$1 [L,QSA]
92 RewriteRule ^api/favorites/destroy/(.*)$ index.php?action=api&apiaction=favorites&method=destroy&argument=$1 [L,QSA]
93 RewriteRule ^api/favorites(.*)$ index.php?action=api&apiaction=favorites&method=favorites$1 [L,QSA]
94 RewriteRule ^api/notifications/follow/(.*)$ index.php?action=api&apiaction=notifications&method=follow&argument=$1 [L,QSA]
95 RewriteRule ^api/notifications/leave/(.*)$ index.php?action=api&apiaction=notifications&method=leave&argument=$1 [L,QSA]
96 RewriteRule ^api/blocks/create/(.*)$ index.php?action=api&apiaction=blocks&method=create&argument=$1 [L,QSA]
97 RewriteRule ^api/blocks/destroy/(.*)$ index.php?action=api&apiaction=blocks&method=destroy&argument=$1 [L,QSA]
98 RewriteRule ^api/help/(.*)$ index.php?action=api&apiaction=help&method=$1 [L,QSA]
99
100 <FilesMatch "\.(ini)">
101   Order allow,deny
102 </FilesMatch>
103