This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/main/.htaccess

81 lines
3.1 KiB
ApacheConf
Raw Normal View History

2015-04-01 15:56:51 +00:00
# Block access to every file starting with a dot
<Files ".*">
Require all denied
</Files>
# Set Error documents
ErrorDocument 404 /404.php
ErrorDocument 403 /404.php
ErrorDocument 401 /404.php
# Rewrite Stuff
RewriteEngine on
RewriteBase /
Options +FollowSymLinks -Indexes
# Rewrite Rules
2015-06-19 23:44:16 +00:00
RewriteRule ^feedback/?$ https://github.com/circlestorm/Sakura/issues [L,QSA]
RewriteRule ^credits/?$ credits.php [L,QSA]
RewriteRule ^index/?$ index.php [L,QSA]
RewriteRule ^login/?$|^logout/?$|^activate/?$|^register/?$|^forgotpassword/?|^authenticate/?$ authenticate.php [L,QSA]
RewriteRule ^donate/?$|^support/?$ donate.php [L,QSA]
RewriteRule ^contact/?$ infopage.php?r=contact [L,QSA]
RewriteRule ^changelog/?$ changelog.php [L,QSA]
RewriteRule ^faq/?$ faq.php [L,QSA]
RewriteRule ^search/?$ search.php [L,QSA]
2015-04-05 16:24:07 +00:00
2015-04-01 17:25:14 +00:00
## Info pages
2015-06-19 23:44:16 +00:00
RewriteRule ^r/([a-z]+)$ infopage.php?r=$1 [L,QSA]
2015-04-01 17:25:14 +00:00
2015-04-02 14:21:37 +00:00
## News
2015-06-19 23:44:16 +00:00
RewriteRule ^news/?$ news.php [L,QSA]
RewriteRule ^news/([0-9]+)$ news.php?id=$1 [L,QSA]
RewriteRule ^news.xml$ news.php?xml [L,QSA]
2015-04-02 14:21:37 +00:00
2015-05-05 03:47:58 +00:00
## Settings
2015-06-19 23:44:16 +00:00
RewriteRule ^settings/?$ settings.php [L,QSA]
RewriteRule ^settings/([a-z]+)/?$ settings.php?mode=$1 [L,QSA]
RewriteRule ^friends/?$ settings.php?friend-action=true [L,QSA]
2015-05-05 03:47:58 +00:00
2015-05-05 06:24:19 +00:00
## Private Messages
2015-06-19 23:44:16 +00:00
RewriteRule ^messages/?$ messages.php [L,QSA]
RewriteRule ^messages/([a-z]+)/?$ messages.php?mode=$1 [L,QSA]
2015-05-05 06:24:19 +00:00
2015-04-27 21:07:48 +00:00
## Members
2015-06-19 23:44:16 +00:00
RewriteRule ^members/?$ members.php [L,QSA]
RewriteRule ^members/([a-z]+)/?$ members.php?sort=$1 [L,QSA]
RewriteRule ^members/([0-9]+)/?$ members.php?rank=$1 [L,QSA]
RewriteRule ^members/p([0-9]+)/?$ members.php?page=$1 [L,QSA]
RewriteRule ^members/([a-z]+)/([0-9]+)/?$ members.php?sort=$1&rank=$2 [L,QSA]
RewriteRule ^members/([0-9]+)/p([0-9]+)/?$ members.php?rank=$1&page=$2 [L,QSA]
RewriteRule ^members/([a-z]+)/p([0-9]+)/?$ members.php?sort=$1&page=$2 [L,QSA]
RewriteRule ^members/([a-z]+)/([0-9]+)/p([0-9]+)/?$ members.php?sort=$1&rank=$2&page=$3 [L,QSA]
2015-04-27 21:07:48 +00:00
2015-04-25 20:08:44 +00:00
## Profiles
2015-06-19 23:44:16 +00:00
RewriteRule ^u/?$ profile.php [L,QSA]
RewriteRule ^u/([A-Za-z0-9_-\s\.]+)/?$ profile.php?u=$1 [L,QSA]
RewriteRule ^u/([A-Za-z0-9_-\s\.]+)/header/?$ imageserve.php?m=header&u=$1 [L,QSA]
RewriteRule ^u/([A-Za-z0-9_-\s\.]+)/groups/?$ profile.php?u=$1&view=groups [L,QSA]
RewriteRule ^u/([A-Za-z0-9_-\s\.]+)/friends/?$ profile.php?u=$1$view=friends [L,QSA]
RewriteRule ^u/([A-Za-z0-9_-\s\.]+)/threads/?$ profile.php?u=$1$view=threads [L,QSA]
RewriteRule ^u/([A-Za-z0-9_-\s\.]+)/posts/?$ profile.php?u=$1$view=posts [L,QSA]
RewriteRule ^u/([A-Za-z0-9_-\s\.]+)/report/?$ report.php?mode=user&id=$1 [L,QSA]
2015-04-25 20:08:44 +00:00
2015-06-20 19:25:41 +00:00
## Groups
RewriteRule ^g/?$ group.php [L,QSA]
RewriteRule ^g/([0-9]+)/?$ group.php?g=$1 [L,QSA]
2015-04-01 15:56:51 +00:00
# Serving Images
2015-06-19 23:44:16 +00:00
RewriteRule ^a/([0-9]+)$|a/([0-9]+).png$ imageserve.php?m=avatar&u=$1 [L,QSA]
RewriteRule ^bg/([0-9]+)$|bg/([0-9]+).png$ imageserve.php?m=background&u=$1 [L,QSA]
2015-05-23 03:31:42 +00:00
# Forum
2015-06-27 11:03:11 +00:00
RewriteRule ^forum/?$ index.php?forums=true [L,QSA]
RewriteRule ^forum/([0-9]+)/?$ viewforum.php?id=$2 [L,QSA]
RewriteRule ^forum/(thread|topic|[0-9+])/([0-9]+)/?$ viewtopic.php?id=$2 [L,QSA]
2015-05-23 03:31:42 +00:00
# Management
2015-06-19 23:44:16 +00:00
RewriteRule ^manage/?$ manage.php [L,QSA]
RewriteRule ^manage/([a-z\-]+)/?$ manage.php?page=$1&sub=0 [L,QSA]
RewriteRule ^manage/([a-z\-]+)/([a-z\-]+)/?$ manage.php?page=$1&sub=$2 [L,QSA]